10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I wish to print first, third and sixth till the last column from the output of ls command
ls -ltr /app/deploy.yml
-rw-rw-r-- 1 user1 dba 27342 Aug 28 10:17 /app/deploy.yml
Desired Output:
Below command gives me the desired output.
ls -ltr /app/deploy.yml | awk '{$2=$4=$5=""; print... (6 Replies)
Discussion started by: mohtashims
6 Replies
2. UNIX for Beginners Questions & Answers
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
3. Linux
I have file that looks like this,
DIP-17571N|refseq:NP_651151 DIP-17460N|refseq:NP_511165|uniprotkb:P45890 DIP-17571N|refseq:NP_651151
DIP-19241N|refseq:NP_524261 DIP-19241N|refseq:NP_524261 DIP-17151N|refseq:NP_524316|uniprotkb:O16797
DIP-19588N|refseq:NP_731165 ... (2 Replies)
Discussion started by: Syeda Sumayya
2 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
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
Discussion started by: CAch
14 Replies
6. Shell Programming and Scripting
We have an access log where column 8 displays the time in seconds like below:
Tj8nQAoNgwsAABov9cIAAAFL - 10.13.131.80 - - (0) - "GET /aaaaa/bbbb/bbbb
where column 8 is printed (0). We are trying to find how many entries are there that has column 8 greater than 0.
Remember $8 is (0) and not... (5 Replies)
Discussion started by: spacemtn5
5 Replies
7. Shell Programming and Scripting
Hi all,
I'm new to Unix and work primarily in bioinformatics. I am in need of a script which will allow me to replace "1" with "chr1" in only the first column of a file which looks like such:
1 10327 rs112750067 T C . PASS ASP;RSPOS=10327;... (4 Replies)
Discussion started by: Hkins552
4 Replies
8. Shell Programming and Scripting
Hi,
I am trying to update the 1st column of a file but only if it contains a char
here is an example of my file
1111aaa 9999 textaaa
22222bbb 9999 textbbb
3333 9999 textccc
444ddd 9999 textddd
i would like the output to remove any characters () from... (5 Replies)
Discussion started by: plennon
5 Replies
9. Shell Programming and Scripting
abc.dat
tty cpu
tin tout us sy wt id
0 0 7 3 19 71
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.0 133.2 0.0 682.9 0.0 1.0 0.0 7.2 0 79 c1t0d0
0.2 180.4 0.1 5471.2 3.0 2.8 16.4 15.6 15 52 aaaaaa1-xx
I want to skip first 5 line... (4 Replies)
Discussion started by: kchinnam
4 Replies
10. Shell Programming and Scripting
Hi,
I have two files. 1st file has 1 column (huge file containing ~19200000 lines) and 2nd file has 2 columns (small file containing ~6000 lines).
#################################
huge_file.txt
a
a
ab
b
##################################
small_file.txt
a 1.5
b 2.5
ab ... (4 Replies)
Discussion started by: AshwaniSharma09
4 Replies