10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am new to Unix and I have one challenge and below are the details.
I have pipe delimited text file in that data has span into multiple lines instead of single line.
Sample data.
Data should be like below for entire file.
41|216|398555|77|provided complete NP outcome data ... (21 Replies)
Discussion started by: Narasimhasss
21 Replies
2. Shell Programming and Scripting
Hi,
I need to number the lines in my text file. I know how to do this with standard numbering (1,2,3,4, etc) but I need to count in multiples of 5, beginning 0,5,10,15...
example existing file:
abcd
efg
hijklm
nopqrs
desired output
0 abcd
5 efg
10 hijklm
15 ... (11 Replies)
Discussion started by: livbaddeley
11 Replies
3. Shell Programming and Scripting
I need help with insert text to the last line of text file with echo command
I know can do something like echo "i4\n$logtext\n.\nwq" | ex -s $file can insert to first line, but how can i change this code in order to insert to the last line of text file?
please help, thank you :( (2 Replies)
Discussion started by: gavin_L
2 Replies
4. Shell Programming and Scripting
Dear All,
i am having text file below
rama 123 done
raju 456 not done
keshav 123 done
...............
............
i want to add a serial number to this file, the output should be
1 rama 123 done
2 raju 456 not done
3 keshav 123 done
99 ...............
100 ............
... (3 Replies)
Discussion started by: suryanarayana
3 Replies
5. Shell Programming and Scripting
I've been playing with sed, trying to get it to insert the contents of somefile.txt after line 13 on anotherfile.txt. I tried searching for a line with regex and attempting to insert something on the next line with:
find ./anotherfile.txt -type f -exec sed -i -e '/^dog/cat/' {} \;
but it... (2 Replies)
Discussion started by: unclecameron
2 Replies
6. Shell Programming and Scripting
hello,
how can I add one text line string at the line number one of a file.
thankx, (5 Replies)
Discussion started by: Ahmed waheed
5 Replies
7. Shell Programming and Scripting
Hi all
How to add line numbers in text file..
ex
abcd
cdef
result
1. abcd
2. cdef
thx in advance (4 Replies)
Discussion started by: suryanarayana
4 Replies
8. Shell Programming and Scripting
I've got a configuration file that is filled with xml text statements for example:
<...../>
<...../>
<...../>
<data id="java-options" value="-server -Djava.security.policy..../>
<...../>
<...../>
<...../>
I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
2 Replies
9. Shell Programming and Scripting
Hi I need to add a comment line at the begining of a text file. The scenario is given below.
1. The number of servers that needs to be updated is around 80
2. The location of the text file in all the servers are the same including the file name.
3. The comment has to be added at the very... (2 Replies)
Discussion started by: orakhan
2 Replies
10. Shell Programming and Scripting
I am trying to add a line of text just before the last line in a file.
For example, if the last line of a file is "exit 0", I need to add a line of text just before that.
Any ideas how I might do that?
Thanks (5 Replies)
Discussion started by: TheCrunge
5 Replies