10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below which does execute I get output that is close, except for all the lines that start with a # are removed. Some lines have one others two or three and after the script adds the
ID= to the fields below the pattern in the awk, I can not seem to add the # lines back to the output. ... (5 Replies)
Discussion started by: cmccabe
5 Replies
2. Shell Programming and Scripting
Hi
Just wondering ... do you have an example of context that would demonstrates how usefull the awk notation can efficiently be used ?
Thx :rolleyes: (6 Replies)
Discussion started by: ctsgnb
6 Replies
3. Shell Programming and Scripting
Trying to use awk to add a . to $4. The input and output is tab-delimeted, but the awk seems to add a . in front of $5 and is space-delimeted. It seems close, but I am not able to produce the desired output. Thank you :).
file
chr1 948895 949015 chr1:948895-949015 ISG15
chr1 ... (1 Reply)
Discussion started by: cmccabe
1 Replies
4. Shell Programming and Scripting
Hi,
My input files is like this
axis1 0 1 10
axis2 0 1 5
axis1 1 2 -4
axis2 2 3 -3
axis1 3 4 5
axis2 3 4 -1
axis1 4 5 -6
axis2 4 5 1
Now, these are my following tasks
1. Print a first column for every two rows that has the same value followed by a string.
2. Match on the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
5. Shell Programming and Scripting
I just tried following
ls *.dat|sort -t"_" -k2n,2|while read f1 && read f2; do
awk '{print}' $f1
awk FNR==1'{print $1,$2,$3,$4,$5,"*","*","*" }' OFS="\t" $f2
awk '{print}' $f2
donegot following result
18-Dec-1983 11:45:00 AM 18.692 84.672 0 25.4 24
18-Dec-1983 ... (3 Replies)
Discussion started by: Akshay Hegde
3 Replies
6. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
7. Shell Programming and Scripting
File A
>answer is the predicted other than >bigger than two
>whatever isthere >out of mind
CGAHHAWWASSASS
SASAWEDSASSDDD
SSDDDEDEUJUYYS
>hello you are there other is what is that>you are not
serious>leave it
SSSAAAAAASS
ASWWQQDDD
WESEEWWWW
WEEEEEWSS
SJUJSGKKSSS
SWBVHJJWUW
>hi i... (3 Replies)
Discussion started by: cdfd123
3 Replies
8. Solaris
deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies
9. Shell Programming and Scripting
Need to compare minus symbol "-" with a column that contains minus on few rows.
the sample script awk I have written is
if ( '$COLUMN2' ~ "\-" ) {}
COLUMN2 is a shell variable. I just need the if condition checking the shell variable within the awk script. Below is the entire awk part... (14 Replies)
Discussion started by: kalee
14 Replies
10. Shell Programming and Scripting
I want to read a large (~1-4Gb) txt file with fields separated by "," and line separator "\n". Unfortunately, file contains \x00 (zero ASCII) symbols
AWK treats them as end of line + it ignores reminder of the line after the \x00.
As a simple example:
echo "\0060\0061\000\0060\0063" | nawk... (6 Replies)
Discussion started by: Murfury
6 Replies