![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | 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. Shell Script Page. |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What the command to find out the record length of a fixed length file? | tranq01 | UNIX for Dummies Questions & Answers | 3 | 10-19-2007 11:16 AM |
| Fixed length (Fill out) | peterk | Shell Programming and Scripting | 3 | 09-28-2007 08:04 AM |
| Awk with fixed length files | c2b2 | Shell Programming and Scripting | 7 | 01-06-2007 08:57 AM |
| fixed length fields in awk | roopla | Shell Programming and Scripting | 2 | 11-13-2006 05:12 PM |
| creating a fixed length output from a variable length input | r1500 | Shell Programming and Scripting | 2 | 12-03-2003 09:09 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
sed replace with fixed length
Quote:
Code:
$ cat template s.noName Quote:
Code:
$ sed "s/s.no/1/" template > out $ sed "s/s.no/100/" template >>out Quote:
Code:
$ cat out 1Name 100Name Quote:
Code:
1 Name 100Name Quote:
|
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
Code:
sed "s/s.no/$sno/" template >>out Quote:
|
|
|||
|
Quote:
Regards Last edited by Franklin52 : 05-14-2008 at 06:03 AM. |
|||
| Google UNIX.COM |