10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have file which contains line with only comma and text separated by comma.
a.txt contain
a,ab,ac
,,
b,bc,bd
,,
,,
c,cd,ce
need to print only line 2, 4, and 5 because they only contain comma and no text.
I need an unix command to find out.
thanks in advance
Please do wrap... (5 Replies)
Discussion started by: pranabpal
5 Replies
2. Shell Programming and Scripting
My OS : RHEL 6.7
I have a text file with comma separated values like below
$ cat testString.txt
'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', . . . .
I want these values to appear like below
'JOHN' ,
'KEITH' ,
'NEWMAN' ,
'URSULA' ,
'ARIANNA' ,
'CHENG',
.... (4 Replies)
Discussion started by: kraljic
4 Replies
3. Shell Programming and Scripting
Hello expert friends,
I'm writing a script to capture stats using sar and stuck up at report generation.
I have around 10 files in a directory and need to merge them all vertically based on the time value of first column (output file should have only one time value) and insert comma after... (6 Replies)
Discussion started by: prvnrk
6 Replies
4. Shell Programming and Scripting
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Discussion started by: deneuve01
2 Replies
5. Shell Programming and Scripting
Hi all,
I have a file in which I have to insert commna between entries of 2 column and createa new file separated by commas not a columns
if input is
FHIT Adenosine Monotungstate Not Available
CS Trifluoroacetonyl Coenzyme A Not Available
Theo expected output is
... (5 Replies)
Discussion started by: manigrover
5 Replies
6. Shell Programming and Scripting
Hi,
I lack the utter fundamentals on how to craft an awk script.
I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies
7. Shell Programming and Scripting
Hi friends,
I am looking for a line to find a particular string in my file and once found then replace with 2-3 blank lines before the string
Example:
aaa 11 bbb
1
2
3
aaa 22 bbb
4
5
6
Output (4 Replies)
Discussion started by: shaliniyadav
4 Replies
8. Shell Programming and Scripting
Hi all,
I have many files that have 1 or more occurrences of the information I want. There are two distinct sets of information. I want get this info and place each occurrence in its own file.
The 3 lines before one set are
this grid
00 01 02
16 17 18
**40 lines of code I want to... (5 Replies)
Discussion started by: gobi
5 Replies
9. Shell Programming and Scripting
I have a file that looks like this:
G. KRESSLAR
9618 W. APPALOOSA DRIVE
SUN CITY, AZ 85373
SHIRLEY ALLEN
7272 W. VIA MONTOYA DRIVE
GLENDALE, AZ 85310
LOUIS VALDEZ
244441 N. 86TH AVENUE
PEORIA, AZ 85383
DONNA NEWBON
3231 W. DENTON #D
PHOENIX, AZ 85017
SARAH WILSON
6534 W. PALO... (3 Replies)
Discussion started by: BCarlson
3 Replies
10. Shell Programming and Scripting
Hi ,
i export the crontab in a file (i've no root right) and i would add lines from a file at a special place and rewrite the output in an another file.
the special place is as this :
45 04 * * * /home/toto.sh > /dev/null 2>&1
#
so i would search for toto.sh and insert the lines , the... (5 Replies)
Discussion started by: Nicol
5 Replies