![]() |
|
|
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 |
| Adding a columnfrom a specifit line number to a specific line number | Ezy | Shell Programming and Scripting | 2 | 05-12-2008 09:29 AM |
| remove single-line comment | Icy002 | High Level Programming | 3 | 04-09-2006 09:30 AM |
| how to insert a line number on every line | mopimp | UNIX for Dummies Questions & Answers | 3 | 03-25-2006 01:35 PM |
| Need to add a comment line in a text file | orakhan | Shell Programming and Scripting | 2 | 09-22-2005 09:36 PM |
| sed to have defined positionning on line | homefp | Shell Programming and Scripting | 10 | 04-29-2002 09:42 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi there,
may someone easily help me on this : I want to insert a text in a specific line number like : linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1` line2insert=`expr $linenumb2start + 2` and now I need to replace something like {} with {comment} at $line2insert. The line actually is : .appdata {} and no identifier can be added to use it for search and substitution. Of course, appdata and {} are already used as well in several locations. Therefore, I really need to use the line number. Do you have a solution using sed or awk ? ![]() Thanks, homefp |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|