![]() |
|
|
|
|
|||||||
| 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 |
| editing ELF file | tejuwala | Linux | 1 | 05-17-2008 08:22 PM |
| Editing file | rahul303 | Shell Programming and Scripting | 4 | 09-23-2007 07:49 PM |
| Editing File using awk/sed | Mohammed | Shell Programming and Scripting | 4 | 05-16-2007 08:00 AM |
| Editing the File using Awk | awk_beginner | Shell Programming and Scripting | 3 | 04-06-2007 07:43 AM |
| File editing using awk | rinku11 | Shell Programming and Scripting | 2 | 11-23-2006 08:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Help with editing file
I have a file of 100000 records. This file is created by concatenation of two files. I want to edit this file from record number 80,000 till the end and add "|N" for each record . How can I acheive this. Please suggest
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Use this command in vi
Code:
80000,$ s/$/|N/ |
|
#3
|
|||
|
|||
|
If the file is too large I am getting error as temp file too large. In this case what should I do?
|
|
#4
|
||||
|
||||
|
find a filesystem with free space (/fs for example) to use for temp file and modify the file with sed:
Code:
sed '80000,$ s/$/|N/' infile > /fs/temp mv /fs/temp outfile |
|
#5
|
||||
|
||||
|
Another solution :
Code:
sed ''80000,$ s/$/|N/' inputfile1 inputfile2 > resultfile |
||||
| Google The UNIX and Linux Forums |