03-14-2013
Bumping up posts or double posting is not permitted in these forums.
Please read the
rules, which you agreed to when you registered, if you have not already done so.
You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future
Thank You.
The UNIX and Linux Forums.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
How do I search first string & second string and copy all content between them from one file to another file?
Please help me..
Thanks In Advance.
Regards,
Pankaj (12 Replies)
Discussion started by: pankajp
12 Replies
2. Shell Programming and Scripting
I have a text (text.txt) and I would like to replace only the first 2 occurrences of a word (but I might need to replace more):
For example, if text is this:
CAR sweet head
hat red yellow
CAR book brown
tiger CAR cow CAR
CAR milk
I would like to replace the word "CAR" with word... (12 Replies)
Discussion started by: bingel
12 Replies
3. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
4. Shell Programming and Scripting
I must design a UNIX script to monitor files whose size is over a threshold of 5 MB in a specific UNIX directory
I meet a problem during the for loop in my script. Some file names contain spaces.
ls -lrt | awk '$5>=5000000 && length($8)==5 {gsub(/ /,"_",$9); print};'
-rw-r--r-- 1 was61 ... (2 Replies)
Discussion started by: Scofield38
2 Replies
5. Shell Programming and Scripting
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
Discussion started by: gr8_usk
8 Replies
6. Shell Programming and Scripting
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Discussion started by: dazhoop
2 Replies
7. Shell Programming and Scripting
Hello,
I'm trying the solve the following problem.
I have a file which I intend to use as a csv called master.csv
The columns are separated by commas.
I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern.... (3 Replies)
Discussion started by: cyphex
3 Replies
8. Shell Programming and Scripting
Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
Discussion started by: siramitsharma
15 Replies
9. Shell Programming and Scripting
Hi I have a source file that looks like
a,b,c,d,e,f,g,h,t,DISTI(USD),MSRP(USD),DIST(EUR),MSRP(EUR),EMEA-DISTI(USD),EMEA-MSRP(USD),GLOBAl-DISTI(USD),GLOBAL-MSRP(USD),DISTI(GBP), MSRP(GBP)
I want to basically change MSRP(USD) to MSRP,USD and DIST(EUR) to DIST,EUR and likewise for all i'm using... (3 Replies)
Discussion started by: r_t_1601
3 Replies
10. Shell Programming and Scripting
Hi Forum.
I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been successful.
Original Data:
4365 monte des source rue,, ,<TAB>trevost<TAB>QC
Desired Data:... (1 Reply)
Discussion started by: pchang
1 Replies