General :: Erasing From The Cursor Up To The Beginning Of The Following Word In Vim
Dec 13, 2010
In a wide family of "ancient" text editors, by pressing ^T you erased from the cursor up to the beginning of the following word. If we use '_' to represent the cursor, the thing was like this:
Code:
If I now hold <CNTL> down and press <T>, the result will be
Code:
Want to feel at home with vim. Many times I have consulted and even tried to systematically study vim's man page. Sometimes I consulted it with profit, sometimes not. This is one of the latter.
View 6 Replies
ADVERTISEMENT
Dec 13, 2010
In a wide family of "ancient" text editors, by pressing ^T you erased from the cursor up to the beginning of the following word. If we use '_' to represent the cursor, the thing was like this:
Code:
want to feel _ at home with vim. If I now hold <CNTL> down and press <T>, the result will be Code: want to feel at home with vim. Many times I have consulted and even tried to systematically study vim's man page. Sometimes I consulted it with profit, sometimes not. This is one of the latter.
View 3 Replies
View Related
Nov 15, 2010
I want to write a small script to rename a bunch of files. Their name is of the form 'long number'|'name'|'extension', for example:
52354Football_part2.flv
2353452Nice_weather_4_ducks.flv
I would like to rename these to:
Football_part2.flv
Nice_weather_4_ducks.flv
If in my script I use something like
Code:
sed s/[0-9]//g
on each file, I will get
Football_part.flv, instead of Football_part2.flv,
and
Nice_weather__ducks.flv, instead of Nice_weather_4_ducks.flv.
how to instruct sed to only remove numbers that are in the beginning of the name in a simple way?
View 2 Replies
View Related
Jun 28, 2011
Want to search for ~ and delete it as well as to append the entire line to the above line. For Ex:
1111xxxx date Sandy area is ~around this area.3222xxx date There seems to ~left side of map, the colours are accurate (showing green areas)Even if I ~zoom in, the green parks, xxx3258 date The dammed up
~away, the "other" body of water varies ~blackNatural gas leaching.
IT MUST LOOK LIKE:
1111xxxx date Sandy area is around this area. 3222xxx date There seems to left side of map, the colours are accurate (showing green areas)Even if I zoom in, the green parks, xxx3258 date The dammed up away, the "other" body of water varies blackNatural gas leaching.
View 4 Replies
View Related
Feb 19, 2010
I have to modify formsweb.cfg file in Oracle IAS.
Problem description
In formsweb.cfg file are two lines with labels archive_jini= and archive= at the beginning of line. After equal sign (=) is row of filenames of java archives delimited by coma(,). When I insert a new jar file in java directory, I have to append the very same name of jar file to both lines if that name is not yet present.
Example snippet from formsweb.cfg
View 2 Replies
View Related
Apr 24, 2010
I am attempting to erase a directory called apps. When I run rm-rf apps it looks like it erases it for the moment. When I log back on to the server the directory is still there, though it is highlighted in green.
drwxrwxrwx 3 user user 4096 2010-04-24 18:33 apps
View 6 Replies
View Related
Dec 1, 2010
While trying to remove a pkg by rpm it's giving the error as:
PHP Code:
How will I remove this package ?
View 3 Replies
View Related
Mar 20, 2011
A friend of mine has just given me an old 80GB hard drive provided that i erase the hard drive. So could someone tell me that if i used Code: shred -vz -n 3 /dev/hda to erase all data contained on the hard drive Would i then have to reformat the hard drive so i could install a Linux OS on it?
View 9 Replies
View Related
Jun 23, 2011
To do that:
Code:
But -blank=fast makes it really faster? Visibly not so much, right?
View 3 Replies
View Related
Feb 5, 2011
I've had problems with my Ubuntu partition on my computer, so I have decided that I might have to format the partition or reinstall Ubuntu.
My problem is that I have files on my partition that I would like to save. I've tried every tool I've found that allows Ext2 to be read in Windows, but none of them work for me. The best I have gotten is that I would be able to see the folders in /, but that is it. I was wondering if it was possible to reinstall Ubuntu without having to erase the partition.
View 1 Replies
View Related
Feb 21, 2011
I tried to to install Kubuntu on a usb port to make it portable. I used my buddies laptop and when the program asked if i wanted to erase the Hard drive I made it erase the USB port and install on there. When I was finished windows would no load up from the Hard drive on the Laptop and the message I got was a code and grub rescue. How can I recover Windows with out erasing the files?
View 12 Replies
View Related
Mar 4, 2010
Well, I am facing one issue:How can i read two files word by word at a time using any loop as i need word by word comparision in shell script?Please let me know pseudo code.
View 14 Replies
View Related
Jan 21, 2011
I have a output file look like this:
{"test1" : "test2", "test3" : "test4"},
How can I read word by word in each line?This is not working code:
a=0
while read word
do a=$(($a+1));
[code]...
View 14 Replies
View Related
Nov 28, 2010
GNU bash 3.1.17. I say there must be, in bash, a keystroke combination that does this: I type say, two words at the prompt. Then I press HOME. And now, holding down some control key, I press a key that erases from current cursor position up to the first blank (the space between the two words). If I am right, which is the key combination? You could as well refer me to the bash manual section where the different combinations, one of them a control key are listed.
View 2 Replies
View Related
Mar 6, 2011
I erasing default text in fedora 13 root bashrc and when I want to swich user ( with su command ) to root , icant,and i see bash-4.1????
View 1 Replies
View Related
Jan 26, 2010
Is it possible to mount a 2nd hard disk without erasing the data that is already on it? If so, what command must I enter. The system recognizes that the disk is there, I just can't access the data because it hasn't been mounted.
View 5 Replies
View Related
Feb 9, 2011
In linux is there a way to find the next word of a particular word of a file. grep displays entire line of the particular word. But i want only the exact next word of that particular word.is there any command for that.
View 13 Replies
View Related
May 4, 2010
I am pretty new to bash scripting...I am trying to write a script that will take an input and read it word for word and then DO something with it like echo. I have been able to find how to read word for word from a file but I don't know how to do it with input.
I was looking for something like
Code:
exit 0 The input would be A-Z a-z 0-9 and have a single space between each word.
View 2 Replies
View Related
Jan 26, 2010
I have found a file beginning with a question mark in my home dir, not sure how the hell it got there. It's from a downloaded rar i think.
Does anyone know how to do this?
View 14 Replies
View Related
Aug 3, 2011
I'm using ubuntu (natty), and when I use ls -l, the files are listed, but apparently the sorting algo ignores any special characters. For ages I've used underscores to mark special folders. And it seems to me, that they were always listed first. Now, the underscore is completely ignores. Let's assume that I have the files fileA, _fileB and fileC in a folder. Currently, ls -l orders them like so:
malbert@dredg:/tmp/1$ ls -l
total 0
-rw-r--r-- 1 malbert domain users 0 2011-08-03 15:27 fileA
-rw-r--r-- 1 malbert domain users 0 2011-08-03 15:27 _fileB
-rw-r--r-- 1 malbert domain users 0 2011-08-03 15:27 fileC
[Code]...
I've dug through the ls man page and could not find anything. Is there somewhere a system-wide collation option? Or something the like?
View 1 Replies
View Related
Sep 14, 2011
Programs like matlab/octave and I'm sure many other ones allow you to start typing a command, and then hit Up to recall the last command that starts with the typed characters. Common linux shell bash doesnot do this. Is there a different shell that does? I'm not asking how to find out the last command, I'm asking if there's a shell that's a little friendlier.
View 3 Replies
View Related
Feb 28, 2011
I have a lot a folders, each named by a number, and in each of these folders I have a specific file (stddev.dat) containing a single line (of numbers) I need to have a single file with each line being one of the stddev.dat (no matter if it is sorted or not), and also I need to add at the begining of each line the number of the folder it comes from.
I 'm no bash expert, and the "add at the begining of the line" is a bit of problem to me". Here is what I've come up with so far, just to put everything in one file, (and also if you know a better/more elegant way to do the same thing I've done, I'm listening)
[Code]...
View 6 Replies
View Related
Jun 8, 2010
I want to convert strings like 002, 049, 050, 100 to numbers: 2, 49, 50, 100.
I tried to use:
Code:
`printf "%5d" $i`
, but it doesnt work , it convert:
002=>2
014=>12
049=>0
View 11 Replies
View Related
Aug 5, 2010
I am trying to create a shell script where a user can specify a file with a list of logins and the script will create a batch file with specific information in specific columns.
Example:
loginfile.txt has
User1
User2
User3
I need the output to be as below:
1 User1 Date 12/31/9999
2 User2 Date 12/31/9999
3 User3 Date 12/31/9999
Where the columns are separated as below.
1[tab][tab]User1[tab]date +%D[tab]12/31/9999
2[tab][tab]User2[tab]date +%D[tab]12/31/9999
3[tab][tab]User3[tab]date +%D[tab]12/31/9999
I can use the nl utility to get the numbers easily enough, but I need two tab separations between the number and the user list. Is there a sed command that will insert at the beginning of each line? If so I can just run nl after I get some tabs up in the front.
View 2 Replies
View Related
Jan 31, 2010
In bash, I would like to remove all zeros (if exist) from the beginning of a strings:
000001234
00123
0000568
View 9 Replies
View Related
Mar 18, 2010
I have and avi file and an ac3 file that contains an alternate audio stream. I run mplayer like: mplayer -audiofile foo.ac3 bar.avi
mplayer takes the audio stream from the ac3 file as expected, but when I try to scroll the video using arrows or pgup/pgdown keys, the audio gets desynced: mplayer just starts playing the audio stream from the beginning. Do I have to pass any additional command line arguments in order to make it scroll properly without desyncing audio?
View 1 Replies
View Related
Nov 28, 2010
Kernel 2.6.21.5, Slackware 12.0
I saved a page from Linuxquestions. It was saved under a filename beginning with '[' (left square bracket). And I now can't delete the file. Unfortunately I cannot send you a screenshot because opening a terminal in the GUI makes ls behave differently. I shall try to describe, assuming the file is in dir '.'. Also let '[SOLVED]foo.html' be the file in question:
Code:
$ ls
<the file is listed>
$ ls [*
/bin/ls: cannot access [*: No such file or directory
$
If I want the hdd to get rid of this file, what should I do? Any hint will be welcome.
View 2 Replies
View Related
Mar 15, 2011
I need to find each line in a file which does NOT begin with a double quote (") and append that line to the previous line. I have been successful doing this using the following command:
cat filname.csv | sed -e :a -e '$!Ns/
[^"]//;ta -e 'P;D' > newfilename.csv
My issue is the substitution. As you would expect after the line is appended to the previous line the first character is removed. I need it to not be removed. I tried:
cat filname.csv | sed -e :a -e '$!Ns/
[^"]/&/;ta -e 'P;D' > newfilename.csv
but it just hangs.
Goal:
Input:
"line 1"
line 2
Output with existing sed command is:
line 1ine2
I need it to be line1line2.
View 9 Replies
View Related
Mar 7, 2011
I'm currently having a problem trying to remove the black screen that appears at Start-Up that asks me which operating system I want to run...I've already deleted wubi but this screen keeps appearing every time my computer starts up...How do I remove or disable this feature?
View 1 Replies
View Related
Jun 4, 2011
Is there some kind of universally recognized pragma that one can insert at the beginning of a text document to designate it to be UTF-8 encoded (or any other encoding)? I've seen certain editors insert encoding comments, and one or two compilers that have an encoding pragma. But I was wondering if anyone has tried to establish some kind of universal tag format for text documents.
View 1 Replies
View Related