![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems with cut | scorpio | Shell Programming and Scripting | 6 | 04-28-2008 08:49 AM |
| NIS+ problems | wjones | UNIX for Advanced & Expert Users | 0 | 04-09-2008 05:30 AM |
| RCP problems | Daishi | UNIX for Dummies Questions & Answers | 0 | 09-10-2007 05:20 AM |
| More SSH Problems..... | Neo | News, Links, Events and Announcements | 1 | 12-19-2002 02:07 PM |
| 'make' problems (compliation problems?) | xyyz | UNIX for Advanced & Expert Users | 5 | 11-05-2001 10:47 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
problems using sed
i have a file acc.sh which has about 10 lines and then i have defined $var which has a line number in it (say 5). i want to extarct from line 5 to the end of the file and put the output into another file. I have used
sed -n $var,'$p' acc.sh | tee abc.sh but at times it does'nt work and gives an error like sed: -e expression #1, char 1: unknown command: `,' can you help me with this. thanks |
|
||||
|
if abc.sh is
192.168.1.41 then the output that i get is v5c01 my code is sed 's/192.168.1.4/v5c0/g s/192.168.1.41/acc1/g' abc.sh 2>&1 | tee abc.sh i want to find 192.168.1.4 and replace it with v5c0 and find 192.168.1.41 and replace it with acc1 and i want to do it using sed |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|