10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
Can someone help me with write part of code in awk to merge 2 files?
Go through file1 check if number from column 3 exist in file2(column 2) if yes take value from column 1 and add to column 4 in file1. If value in column 4 exist in file1 skip it.
file1... (2 Replies)
Discussion started by: vikus
2 Replies
2. Shell Programming and Scripting
Dear friends,
I'm wondering if we could do some simple math on two arrays with the same size?
a1
Fe -0.21886700 -0.01417600 -0.24390300
C 2.20529400 0.89434100 -0.61061000
C -1.89657700 -0.74793000 -0.07778200
C ... (8 Replies)
Discussion started by: liuzhencc
8 Replies
3. Shell Programming and Scripting
hello
I have example file
AA 11
BB 22
CC 33
And what I expect to have
-a AA=11 -a BB=22 -a CC=33
can anyone help how I have this using awk? (1 Reply)
Discussion started by: vikus
1 Replies
4. Shell Programming and Scripting
Hallo Family,
I have csv file which has over a million records in it. All i want to do is to change field 2 to have the same value as field 10.
sample file:Now
0860093239,Anonymous,unconditional,+27381230283,Anonymous,unconditional,y,public,,2965511477:0A
Desired output:
... (2 Replies)
Discussion started by: kekanap
2 Replies
5. Shell Programming and Scripting
Hi all,
I need to convert some files with the following name format:
<Base File Name>_YYYYMMDD_HHMISS_NNNNN.*
to:
NNNNNN_<Base File Name>_YYYYMMDD_HHMISS.*
Example:
MY_FILE_NAME_20120912_123443_12345.data
will be converted to
012345_MY_FILE_NAME_20120912_123443.data
Notice that... (9 Replies)
Discussion started by: schweinshaxe
9 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I am having issues generating the output file below from this input file:
Basically, what I want is if the ID= matches with the line below to print the first value in column 3 and the last value of column 4 for the matching ID's. The ID's can repeat more than twice, however, they... (2 Replies)
Discussion started by: verse123
2 Replies
7. Shell Programming and Scripting
Dear all,
I need to manipulate some filenames (dump.1, dump.2, etc.) and feed them to another command. For this purpose I am using sed and because my last COMMAND needs to receive files one-by-one I am using xargs:
>> ls dump.* | xargs sed -n 's/expression1/expression2/' | COMMAND
The... (4 Replies)
Discussion started by: bigboss010
4 Replies
8. Shell Programming and Scripting
OK, so if $0 represent the entire record... can I change $2 and will that be reflected back in $0?
I think the following answers that YES, it does work. But is there anything I should be thinking about prior to doing this? What I am actually doing is part of 5 pages of scripting and awk... (1 Reply)
Discussion started by: joeyg
1 Replies
9. Shell Programming and Scripting
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies
10. Shell Programming and Scripting
Hi ,
what a wonderful command but so hard to maintain !
i have a file like that :
03/07/2006 05:58:45
03/07/2006 06:58:45
03/07/2006 07:58:50
03/07/2006 08:58:50
and i want to read it and keep only the lines with 3rd field less than 07:00:00
writing it in a second file !
... (2 Replies)
Discussion started by: Nicol
2 Replies