10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
My requirement is to add a specific line in a file after a certain line that contains 'setenv'
the existing code is like
setenv SEQFILES "/ConvWrk/inteng03/alltars/bnymais1"
LIBDEF scope='JOB' type='PGM' dataset='SUNAR.PJ90000P.JOBLIB'... (5 Replies)
Discussion started by: gotamp
2. Shell Programming and Scripting
I am doing something like below:
I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record.
cat file1... (7 Replies)
Discussion started by: Saanvi1
3. Shell Programming and Scripting
I want to add a text to the end of the specific line in a file. Now my file looks like this:
I want to add the string " 555" to the end of the first line contaning 111. Moreover, I want to insert a newline after this line containg the "000" string. The... (8 Replies)
Discussion started by: wenclu
4. UNIX for Dummies Questions & Answers
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
5. Shell Programming and Scripting
HI All, I need to search for a particular pattern input by the user in order to delete the line. My username.txt has
The program i written
... (3 Replies)
Discussion started by: ichar
6. Shell Programming and Scripting
I have a flat file where last line of it has word D$mhtt
I want to add a space and back slash after it.
Also wanna add -S "J" in the last line.
Following example will make it clear.
I have this in the last line of file
Please... (5 Replies)
Discussion started by: anushree.a
7. Shell Programming and Scripting
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Discussion started by: cdn_humbucker
8. Shell Programming and Scripting
I am tring to insert a newline with "/" in a text file whenever there is the text "end;"
right now I have inside file:
I want to have:
I tried doing the following within the file
:g/^end;/s//end; \/ / (4 Replies)
Discussion started by: jxh461
9. Shell Programming and Scripting
I wanted to add specific text to each row in a text file containing three rows. Example:
0 8 7 6 5 5
7 8 9 0 7 9
7 8 9 0 1 2
And I want to add a 21 at the beginning of the first row, and blank spaces at the beginning of the second two rows. To get this:
21 0 8 7 6 5 5
7 8... (4 Replies)
Discussion started by: hertingm
10. Shell Programming and Scripting
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy