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. UNIX for Dummies Questions & Answers
For example, I would like to insert a pipe every 4 characters for each second field (including after the last block).
input (coma separated):
my... (2 Replies)
Discussion started by: beca123456
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 have a file like this
I want to insert a character or space if the line starts with a number and I used the command
But in the output file, when it inserts this character, first digit in the number is... (2 Replies)
Discussion started by: kaav06
6. Shell Programming and Scripting
I want to insert space in 7th position of all the lines usign vi editor or sed command
. (7 Replies)
Discussion started by: Jairaj
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8. 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
9. 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
10. 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:
and I want my output to look like this:
I tried the following awk code, but it's not working:... (3 Replies)
Discussion started by: mmarino