10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The awk below produces the current output, which will add +1 to $3. However, I am trying to add the length of the matching characters between $5 and $6 to $3. I have tried using sub as a variable to store the length but am not able to do so correctly. I added comments to each line and the... (4 Replies)
Discussion started by: cmccabe
2. Shell Programming and Scripting
I have the following type of 2 column file:
I would like to print only certain sections of the file depending on the value of the second column.
For instance,... (6 Replies)
Discussion started by: owwow14
3. Shell Programming and Scripting
I want to add a sentence to "post column" those who are only less than 30 characters.Thank you very much for your help.
"Z","Zoo","test 54325 test 45363mc."
"Z","Zen","rs2w3rsj 2d342dg 2d3s4f23 d23423s23h 2s34s2423g ds232d34 2342."
"Z","Zet","test4444... (3 Replies)
Discussion started by: hoo
4. Shell Programming and Scripting
i have following fixed width text(also has a delimiter)
to get output as
id;name;age;;;title;date (remove comments but keep the delimiter in between)
i use cut -c1-12,22,32-
suppose if i want to insert another ; somewhere like ... (3 Replies)
Discussion started by: petergemeni
5. UNIX for Dummies Questions & Answers
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
Discussion started by: MS75001
6. Shell Programming and Scripting
I have files named like ABAB09s099E1AAV1.pdf and ABAB09s099E2AAV1.pdf in a directory. I need to add _Lop in the end of the name, like ABAB09s099E1AAV1_Lop.pdf for all files. For files with E2 in the name I also have to replace 99 with 88 in the filename, that would be ABAB09s088E2AAV1_Lop.pdf
... (3 Replies)
Discussion started by: hakkar
7. Shell Programming and Scripting
I want to add some value at the specific position.
My file has data like
Welcome to UNIX Forums
I want to add some value at the end but at same character position for all lines.
I want my output file to have data like :
Here '_' represents blanks.... (3 Replies)
Discussion started by: dashing201
8. Shell Programming and Scripting
I have a text file like this with hundreds of lines:
all lines are very similar and have exactly 10 digits. I want to separate the digits by twodigit and hyphens....like so,
10-27-12-40-00... (7 Replies)
Discussion started by: ajp7701
9. Shell Programming and Scripting
I need to add spaces in between characters in a string variable.
Is there a shortcut? I know you can remove the spaces with sed, but does sed have a way to add them?
I have: DATA01
I want it to be: D A T A 0 1
What I have done so far is to create a function... (4 Replies)
Discussion started by: heyindy06
10. Shell Programming and Scripting
I have a file with few n number of lines .I want to add any character ie comma "," in begining of each line of the file i dont know how many lines the file may contain Also, i want to add comma twice ot thrice in front of each line like 3 coulmn's.
output... (7 Replies)
Discussion started by: er_aparna