10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
i am trying to print required multiple columns dynamically from a fie.
But i am able to print only one column at a time.
i am new to shell script, please help me on this issue.
i am using below script
awk -v COLT=$1 '
NR==1 {
for (i=1; i<=NF; i++) {
... (2 Replies)
Discussion started by: balu1234
2 Replies
2. UNIX for Beginners Questions & Answers
Hi everybody,
I have file 1 with 15 columns, I want to change the formatting of the numbers of columns 10,11 and 12 in the scientific notation.
I used the Following script:
awk '{print $10}' file1.dat | awk '{printf "%.2e\n", $1}' > file2.dat
awk '{print $11}' file1.dat | awk '{printf... (7 Replies)
Discussion started by: supernono06
7 Replies
3. Shell Programming and Scripting
Hi guys,
I have hundreds file like this, here I only show two of them:
file 1
feco4_s_BB95.log ZE_1=-1717.5206260
feco4_t_BB95.log ZE_1=-1717.5169250
feco5_s_BB95.log ZE_1=-1830.9322060... (11 Replies)
Discussion started by: liuzhencc
11 Replies
4. Programming
Hi all,
If i would like to process a file input as below:
col1 col2 col3 ...col100
1 A C E A ...
3 D E G A
5 T T A A
6 D C A G
how can i perform a for loop to count the occurences of letters in each column? (just like uniq -c ) in every column.
on top of that, i would also like... (8 Replies)
Discussion started by: iling14
8 Replies
5. Shell Programming and Scripting
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies
6. UNIX for Dummies Questions & Answers
Hey everyone,
I have an issue with a client that is passing me a list of values in one column, and occasionally the combination of all the values results in more than an 255 character string. My DB has a 255 character limit, so I am looking to take the column (comma delimited file), and if it... (1 Reply)
Discussion started by: perekl
1 Replies
7. Shell Programming and Scripting
Hello,
I have two files
Original: ( 5000 entries)
Chr Position
chr1 879108
chr1 881918
chr1 896874 ...
and a file with allele freq ( 2000 entries)
Chr Position MAF
chr1 881918 0.007
chr1 979748 0.007
chr1... (9 Replies)
Discussion started by: nans
9 Replies
8. Linux
Hi all,
My input file is :
0 13400000 sil
13400000 14400000 a
14400000 14900000 dh
14900000 15300000 a
15300000 16500000 R
16500000 17000000 k
17000000 17300000 u
17300000 17600000 th
17600000 17900000 sil
17900000 18400000 th
18400000 18900000 a
18900000 19600000 g
19600000 19900000... (1 Reply)
Discussion started by: girlofgenuine
1 Replies
9. Shell Programming and Scripting
Hello Team,
I have written following command which is giving output is as shown below.
bash-3.00$ grep -i startup catalina.out | tail +2 | sed -n 1p | awk -F" " '{ for (x=1; x<=5; x++) { printf"%s\n", $x } }'
Dec
19,
2010
3:28:39
PM
bash-3.00$
I would like to modify above command to... (2 Replies)
Discussion started by: coolguyamy
2 Replies
10. Shell Programming and Scripting
Well the title is not too good, so I will explain.
I need to move (rename) files using a simple AIX script.
???file1.txt
???file2.txt
???file1a.txt
???file2a.txt
to be:
???renamedfile1'date'.txt
???renamedfile2'date'.txt
???renamedfile1a'date'.txt
???renamedfile2a'date'.txt
... (4 Replies)
Discussion started by: grimace15
4 Replies