10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Everyone,
I have many files like so:
file1.txt
file2.txt
file3.txt
Within each file I have many lines of random text separated by commas like so:
abcAAA,123,defAA,456777,ghiA,789
jklB,101,mnoBBB,11211,pqrB,13111
stuCC,415,vwxCCCC,161,yzaC,718
I am trying to use SED or AWK to... (4 Replies)
Discussion started by: D3U5X
4 Replies
2. UNIX for Beginners Questions & Answers
Hi,
Need a help to replace a word if a pattern is found between the delimiters preferably using SED or AWK.
below is the sample file that iam dealing with, need to match pattern 'application' if found replace the whole word between the delimiters and also print the lines that don't match.... (1 Reply)
Discussion started by: tech_frk
1 Replies
3. Shell Programming and Scripting
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Discussion started by: dani777
9 Replies
4. Shell Programming and Scripting
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies
5. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
6. Shell Programming and Scripting
3
10 20
10 100
100 10000
Output:
3
10 20
10 100
100 10000
---------- Post updated at 07:59 AM ---------- Previous update was at 07:56 AM ----------
sed '/^$/d' file doesn't work. (8 Replies)
Discussion started by: cola
8 Replies
7. UNIX for Dummies Questions & Answers
Hi
I have a problem when i use awk or sed to replace characters in file.
For example when I want to replace line like this :
00000O120100512 1.70 1.59 0.00 +7.280
I want to get a new line :
0000000O120100512 1.70 1.59 13.56 +7.280
In ksh :
awk... (1 Reply)
Discussion started by: Artur
1 Replies
8. Shell Programming and Scripting
Hi suppose I have a csv file like this
count,1977,1978,1979
usa, , , blue
japan, red, yellow,green
india, , yellow,blue
china, blue, yellow, green
I want the output to be(replace everything, including empty data, with the most recent data):
... (1 Reply)
Discussion started by: grossgermany
1 Replies
9. Shell Programming and Scripting
Okay, title is kind of confusion, but basically, I have a lot of scripts on a server that I need to replace a ps command, however, the new ps command I'm trying to replace the current one with pipes to sed at one point. So now I am attempting to create another script that replaces that line.
... (1 Reply)
Discussion started by: cbo0485
1 Replies
10. Shell Programming and Scripting
Sed help
echo "(200 rows affected)" | sed -e '/\(//p' | sed -e '/\)//p' | awk '{print $1}'
I want output as "200"
Please help me correct (2 Replies)
Discussion started by: pinnacle
2 Replies