10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
In the f1 file below I am trying to clean it up removing lines the have _tn_ in them. Next, removing the characters in $2 before the ninth /. Then I remove the ID_(digit- always 4). Finally, the charcters after and including the first _. It is curently doing most of it but the cut is removing $1... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Beginners Questions & Answers
I apologize in advance, but I continue to have trouble searching for matches between two files and then printing portions of each to output in awk and would very much appreciate some help.
I have data as follows:
File1
PS012,002 PRQ 0 1 1 17 1 0 -1 3 2 1 2 -1 ... (7 Replies)
Discussion started by: jvoot
7 Replies
3. Shell Programming and Scripting
Hi Gurus,
I have following input file. I tried multiple awk combinations to print selected columns without success.
HEX ID Name ver FLRGT Start Time Total Shared End Date
----- -------- --- ------ ------------------------ -------------- -------... (4 Replies)
Discussion started by: shunya
4 Replies
4. Shell Programming and Scripting
Hy!
I need to post-process some data files which have variable (and periodic) number of fields. For example, I need to square (data -> data*data) the folowing data file: -5.34281E-28 -3.69822E-29 8.19128E-29 9.55444E-29 8.16494E-29 6.23125E-29
4.42106E-29 2.94592E-29 1.84841E-29 ... (5 Replies)
Discussion started by: radudownload
5 Replies
5. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
6. Shell Programming and Scripting
I need to take 2 input files and create 1 output based on matches from each file. I am looking to match field #1 in both files (Userid) and create an output file that will be a combination of fields from
both file1 and file2 if there are any differences in the fields 2,3,4,5,or 6.
Below is an... (5 Replies)
Discussion started by: ambroze
5 Replies
7. Shell Programming and Scripting
Hi,
I am using UBUNTU 12.04.
I have a dataset as follows:
Column#1 Column#2 Column#3 .... Column#50
1 154878
1 145145
2 189565
2 454121
... (5 Replies)
Discussion started by: Homa
5 Replies
8. UNIX for Dummies Questions & Answers
command/script(apart from awk) to print the fields in reverse order
that is last field has to come first and so on and first field has to go last
Input
store-id date sale
.............
.............
... (3 Replies)
Discussion started by: tsurendra
3 Replies
9. Shell Programming and Scripting
hi all
i get a file from a server and i do not know how many fields that file will contain.
i need to cut from the second column of the file to the last, irrespective of how many fields are there.
is there any way to make the awk command dynamic for fetching from the second to the last... (4 Replies)
Discussion started by: sais
4 Replies
10. Shell Programming and Scripting
Hi,
I want to print certain fields from my data file depending on certain conditions. Somebody pls let me know how to send it to awk.
The command below is the one which I want to use in a shell script and this prints fine
cat ./datafile.dat | grep -i $SEARCH_STR | awk -F: '{ print $1 $2 $3... (5 Replies)
Discussion started by: maverix
5 Replies