10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm trying to add a new line after finding a specific String.
That is my string:
and I want to change that file to:
-... (4 Replies)
Discussion started by: siamak
2. Shell Programming and Scripting
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
# Process file
echo "File Name=" $file
... (19 Replies)
Discussion started by: bharath561989
3. Shell Programming and Scripting
If my first character of a line starts with 2 then after 5th charecter newline character should be inserted.
00007... (8 Replies)
Discussion started by: unme
4. Shell Programming and Scripting
I have a file and I can get the line with a specific pattern. I want to inset # on start of the line.
aa bb cc
bb hh kk
kk ll yy
dd aa kk
rr tt aa
I want to comment out the line with contain "aa"
after running the script
#aa bb cc
bb hh kk
kk ll... (7 Replies)
Discussion started by: Biplab
5. Shell Programming and Scripting
I need an awk script that returns the 1st field of the line in the middle of a file. For example, if a file I have has 6 lines, I want it to return the 1st field on line number 3. If a file has 7 lines, I want the script to return the 1st field on line number 4.
2... (8 Replies)
Discussion started by: jontjioe
6. 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..
ddsadsgag506pghssuyk (1 Reply)
Discussion started by: 793589
7. UNIX for Dummies Questions & Answers
I have below type file.
Pipe location and count is dynamic and coming from a variable.
I want to change it to below files.
(chnage the first pipe to 3 pipes)
(chnage the second pipe to 4 pipes)... (1 Reply)
Discussion started by: swat
8. Shell Programming and Scripting
I have a log file generated by a tool which has the following look :
/tmp/releases/directory/datefilename3_release_date.zip... (8 Replies)
Discussion started by: bhaskar_m
9. 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
10. Shell Programming and Scripting
Create a file with x amount of lines in it, the content of your choice.
Write a script that takes two arguments. The first being a line of text, the second being your newly created file. The script should take the first argument and insert it into the very top (the... (3 Replies)
Discussion started by: ali hussain