10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a shell script which has a for loop that scans list of files and do find and replace few variables using sed command. While doing this, it deletes the last line of all input file which is something wrong. how to fix this. please suggest. When i add an empty line in all my input file,... (5 Replies)
Discussion started by: rbalaj16
5 Replies
2. Shell Programming and Scripting
Hi all,
I'd always appreciate all helps from this site.
I would like to delete duplicated chunks of strings on the same row(?).
One chunk is comprised of four lines such as:
path name
starting point
ending point
voltage number
I would like to delete duplicated chunks on the same... (5 Replies)
Discussion started by: jypark22
5 Replies
3. Shell Programming and Scripting
sed /'1-2'/&^/ filename
suppose there is a file containing three lines , how do we do delete the word from each line?
hyter efr frf
rerfer efe ewd
cdcf evrfgf erfv
the output has to look like
frf
ewd
erfv (2 Replies)
Discussion started by: Rajeev Nukala
2 Replies
4. Shell Programming and Scripting
Hi all,
I ahve a program which has to delete a line in a file... if i run the sed command through shell prompt it works fine. But if run it using code its throwing error. May i know where i am doing wrong.
the file has 3 lines
# cat /root/.ssh/known_hosts... (4 Replies)
Discussion started by: vivek d r
4 Replies
5. Shell Programming and Scripting
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line... (4 Replies)
Discussion started by: sudeep.id
4 Replies
6. UNIX for Dummies Questions & Answers
Hi
I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line to... (1 Reply)
Discussion started by: sudeep.id
1 Replies
7. Shell Programming and Scripting
Hi there,
I'd like to delete the beginning of a line up until it finds a certain word or character string: in this case, I'd like to delete each line up to the word "mounting".
Thanks ;)
Susan (12 Replies)
Discussion started by: kitykity
12 Replies
8. Shell Programming and Scripting
I Have file1 with below lines :
#HostNameSelection=0 :NotUsed
#HostNameSelection=1 :Automatic
#HostNameSelection=3 :NotForced
I have file2 which has similar lines but with different values
I want to copy the changes from file1 to file2 ,line by line only if line begins with '#'.
for... (7 Replies)
Discussion started by: mvr
7 Replies
9. Shell Programming and Scripting
336 brtr
256 hello
Output:
brtr
hello
How can i do this with sed,awk or perl? (5 Replies)
Discussion started by: cola
5 Replies
10. Shell Programming and Scripting
Hi,
I need convert a dump file in the following format : (please note that line numbers are provided for easy look)
Original file:
1 2007-10-2482.90 No trade 0 0.00 100000.00
2 100000.00
3 0.00
4 HOLD
5 2007-10-2589.75 Bought 1114 1114 100000.00 0.00
... (5 Replies)
Discussion started by: sabyasm
5 Replies