10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
I have a huge data of the below format
abc #apple 1200 06/23
ghj #orange 1500 06/27
uyt #banana 2300 05/13
efg #vegetable 0700 04/16
After first 3 letters, i have 9 spaces and after fruit there are no specific fixed space, but it varies... (4 Replies)
Discussion started by: jayadanabalan
4 Replies
2. Shell Programming and Scripting
how can i insert a string sush as "###" instead of blank lines in a file?
i try this code but it doesn't work!
awk 'NF<1 {$1=="###" ; print$0}' in_file > out_file (13 Replies)
Discussion started by: oreka18
13 Replies
3. Shell Programming and Scripting
Hi,
I have a file with no blank line anywhere
Its a conf file, The lines between and starts with "#" should be sort out with the first three characters(characters are between (a-z)). and insert a blank space in between the uniq lines. For clear understanding ,pls find the below input file... (11 Replies)
Discussion started by: anil8103
11 Replies
4. Shell Programming and Scripting
Hello,
I am trying to write a script that will count the number of characters for each line in a file and all the lines that have less than 80 characters and that are ending with a period, I want it to insert a blank line after them immediately. But, for whatever reason the condition if ]] is... (3 Replies)
Discussion started by: Pouchie1
3 Replies
5. Shell Programming and Scripting
Hi all,
I've googling around forum regarding my prob, the nearest would same as thread tittled Insert blank line if grep not found, but she/he did not mention the solution, so I would like to request your help
I've this task, to search in file2 based on pattern in file1 and output it to... (4 Replies)
Discussion started by: masterpiece
4 Replies
6. Shell Programming and Scripting
I have a file with data as below :
Heading 1
-------------
Heading 1 data1
Heading 1 data2
Heading 1 data3
Heading 1 data4
Heading 2
-------------
Heading 2 data1
Heading 2 data2
Heading 2 data3
Heading 2 data4
Heading 3
-------------
Heading 3 data1
Heading 3 data2
Heading 3... (2 Replies)
Discussion started by: yoursdivu
2 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I am an super newbie, so forgive my sheer ignorance. I have a series of text files formatted as follows (just showing the header and first few lines):
mean_geo mean_raw lat lon
0.000 0 -70.616 163.021
0.000 0 -70.620 163.073
0.000 ... (8 Replies)
Discussion started by: vtoniolo
8 Replies
8. Shell Programming and Scripting
i need to compare three files in unix
a.txt b.txt c.txt
1 2 1
2 5 3
4 6 5
5 6
6
i need to insert a blank line in the file if i don't find a match
and put the items at the same column if found a match
The items in the files... (4 Replies)
Discussion started by: mad_man12
4 Replies
9. Shell Programming and Scripting
I need your help,
I want to add a text every 2nd line and also a blank line after 3 line
(In the output 2nd line is "changetype: modify" and every 4th line is blank line)
Input file format
dn: abc
orclsourceobjectdn: abcd
dn: bcd
orclsourceobjectdn: bcda
dn: cba
orclsourceobjectdn:... (7 Replies)
Discussion started by: athidhi
7 Replies
10. Shell Programming and Scripting
Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:
I need to search file2 for pattern in file1. If pattern found append file2 line to file3. If pattern not found append a blank line to file3.
file1 contents example:
123
456
789... (6 Replies)
Discussion started by: michieka
6 Replies