![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| set EDITOR=vi -> default editor not setting for cron tab | aarora_98 | Shell Programming and Scripting | 6 | 09-12-2008 11:01 PM |
| Which editor to use? | Nafanja | UNIX for Dummies Questions & Answers | 5 | 11-29-2007 09:58 AM |
| Vi editor | jazz | High Level Programming | 1 | 11-17-2005 05:37 AM |
| vi editor | eloquent99 | UNIX for Dummies Questions & Answers | 1 | 01-14-2003 02:49 AM |
| Using the vi editor | pbsys | UNIX for Dummies Questions & Answers | 2 | 11-05-2001 12:27 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vi editor ?
Hello everybody,
My question is: how to add /tmp/work at the end of line in vi editor. my file looks like: cp file1 cp file2 cp file3 **** I need to add " /tmp/work" at the end of each line. I tried this :%s/$/" /tmp/work" and this :%s/$/\ /tmp/work\/ but it does not work. Please help. Thank you |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Quote:
:%s/$/ \/tmp\/work\// or you could change the separator like this: "%s:$: /tmp/work/: Both of these options will change the file to cp file1 /tmp/work/ cp file2 /tmp/work/ cp file3 /tmp/work/ ; |
|
#3
|
|||
|
|||
|
Thank you very much
All the best. |
|||
| Google The UNIX and Linux Forums |