help needed


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
help needed

I have a data file like this. I need to append N at the end for each and every record. How can i do that.

My input filr lokks like this

6486597|327|3023|64|00001|DR|41417|T|00001|N

My out put should look like this

6486597|327|3023|64|00001|DR|41417|T|00001|N|N

This should be repeated for every record in the file. Please suggest
# 2  
Using sed :
Code:
sed "s/$/|N/" inputfile


Jean-Pierre.
# 3  
Code:
printf "%s|N\n" "$(<infile)"

Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
some vi help needed
sangfroid
Hi, I have a file with following contents This is a text file. It is a long string. I wanted to know how to how to move the contents of the second line (a text file. It is a long string.) to the end of file line so that it becomes This is a text file. It is a long string.... UNIX for Dummies Questions & Answers
3
UNIX for Dummies Questions & Answers
Help needed
rose_flower
hello guys I was wondering if somebody can help me to write a script that use a ypcat comand to list a gruop of memebers and the passwrod file and I can arrange the output as a following 5 : fac 6 : office 6 : mkl 18 : system 20 : xsystems 21 : guest... Homework & Coursework Questions
1
Homework & Coursework Questions
help needed...
Prat007
Guys, There is a file where there are 1000s of records. In the file if some condition satisfies in a certain TAB record (TAB would be first 3 digits of a certain record) then move TAB and all the records (or lines) after TAB to new_file, until another TAB record is encountered in the same...... Shell Programming and Scripting
1
Shell Programming and Scripting
Help needed
ithirak17
Hello all, I am new to unix.i need the interview questions commonly asked for shell scripting and unix.if anyone had the useful link please tell me. Thanks in advance...... Shell Programming and Scripting
1
Shell Programming and Scripting
Help needed
akhil1460
HI can any one help me with the appropriate answers for the below: 1.Enter an # before a command and press .what do you see,and how do you think you can take advantage of the behaviour? 2.Is tar -cvfb20foo.tar*.c legitimate or not.will this command work without the - symbol? 3.The command...... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers