10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
My program run without error. The problem I am having.
The program isn't outputting field values with the column headers to file.txt.
Each of the column headers in file.txt has no data.
MEMSIZE SECOND SASFoundation Filename
The output results in file.txt should show:
... (1 Reply)
Discussion started by: dellanicholson
1 Replies
2. Shell Programming and Scripting
Hi ALL,
I want to replace string occurrence in my file "Config" using a external file named "Mapping" using awk.
$cat Config
! Configuration file for RAVI
! Configuration file for RACHANA
! Configuration file for BALLU
$cat Mapping
ravi:ram
rachana:shyam
ballu:hameed
The... (5 Replies)
Discussion started by: useless79
5 Replies
3. 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
4. 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
5. Shell Programming and Scripting
Hi,
I have two files master.txt & reference.txt. Sample below
Master.txt
2372,MTS,AP
919848001104,Airtel,DL
0819,MTS,MUM
919849788001,Airtel,AP
1430,Aircel MP,20
Reference.txt
2372,919848701430,46467
919848002372,2372,47195
2372,919849788001,59027
0819,028803,1
0819,029801,1... (2 Replies)
Discussion started by: siramitsharma
2 Replies
6. Shell Programming and Scripting
Hi,
I am trying to execute this line
awk -F ";" -v OFS=";" '{gsub(/\./,",",$6); print}' FILE
but for multiple fields $6 $7 $8
Do you have a suggstion?
Tried:
awk -F ";" -v OFS="";"" "function GSUB( F ) {gsub(/\./,\",\",$F); print} { GSUB( 6 ); GSUB( 7 ); GSUB( 8 ) } 1"... (2 Replies)
Discussion started by: nakaedu
2 Replies
7. UNIX for Dummies Questions & Answers
%%%%% (1 Reply)
Discussion started by: lucasvs
1 Replies
8. 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
9. 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
10. 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