9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to correct href portion of the lines to edit out spaces from the line starting with position "<a href=" and ending at "target="
Below are 2 examples of extra space added by the server:
<td width=251 colspan=9 rowspan=22> <font size=2 face="courier"><tt><style>{font:7pt Courier ... (4 Replies)
Discussion started by: friedmi
4 Replies
3. Shell Programming and Scripting
Hello,
How do I use sed to search for a pattern in the middle of a line and delete the whole line.
The command I have is as below.
sed -i '/soft nofile/ d' /etc/security/limits.conf
I have some *'s and spaces in front of the string. With the above command I'm not able to delete it. Any... (3 Replies)
Discussion started by: jawaugh
3 Replies
4. UNIX for Dummies Questions & Answers
How would you do vim copy line and paste at the beginning, middle, and end of another line. I know yy copies the whole line and p pastes the whole line, but on its own separate line. Sometimes I would like to copy a line to the beginning, middle, or end of another line. I would think this would be... (3 Replies)
Discussion started by: cokedude
3 Replies
5. Shell Programming and Scripting
Input:
qwertmyuiop
It should print "m".
What's the command to do this with sed? (6 Replies)
Discussion started by: cola
6 Replies
6. UNIX for Dummies Questions & Answers
I tried to replace the following in vi:
old: 'e/thesis/pp/zones/zones'
new: 'd/so162/fix/pp'
For that, I used: :%s/e/thesis/pp/zones/zones/d/so162/fix/pp/g
but doesn't work, a trailing character error message appeared. How can I get it?
Thanks in advance (3 Replies)
Discussion started by: Gery
3 Replies
7. UNIX for Dummies Questions & Answers
exmaple, i need to replace the number "5" from all lines below with "X"?
What is the useful vim command that i can apply for..
ddpadsgg506xghssuyj
ddpadsgag546xghssuys
ddsadsgaag596xghssuy_te
ddsadsgag506xghssuy_pe
ddsadsgagc526xghssuys
ddsads506ighssuys
ddsadsgag506pghssuyk (1 Reply)
Discussion started by: 793589
1 Replies
8. Shell Programming and Scripting
I have tried
sed '/6/a text_to_inserted' file > newfile
but this inserts test_to_insert at random places in file and i want it in specific location, which is line 6.
can anyone help.... (6 Replies)
Discussion started by: phenom
6 Replies
9. Shell Programming and Scripting
I'm trying to insert a single character at position 11 in everyline of a file.
My input file looks like this:
456781 ~Y~12345
456782 ~N~12300
and I want my output to look like this:
45678~1 ~Y~12345
45678~2 ~N~12300
I tried the following awk code, but it's not working:... (3 Replies)
Discussion started by: mmarino
3 Replies