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. UNIX for Beginners Questions & Answers
Hello, I have two tab files with headers
File1: with 4 columns
header1 header2 header3 header4
44 a bb 1
57 c ab 4
64 d d 5
File2: with 26 columns
header1.. header5 header6 header7 ... header 22...header26
id1 44 a bb
id2 57 ... (6 Replies)
Discussion started by: nans
6 Replies
4. Shell Programming and Scripting
Hello,
I have to fish out some specific columns from a file based on the header value. I have the list of columns I need in a different file. I thought I could read in the list of headers I need,
# file with header names of required columns in required order
headers_file=$2
# read contents... (11 Replies)
Discussion started by: LMHmedchem
11 Replies
5. 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
6. 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
7. Shell Programming and Scripting
I have a file1.txt
file1.txt
F-120009210","Felix","U-M-F-F-F-","white","yes","no","U-M-F-F-F-","Bristol","RI","true"
F-120009213","Fluffy","U-F-","white","yes","no","M-F-","Warwick","RI","true"
U-120009217","Lity","U-M-","grey","yes","yes","","Fall River","MA","true"... (4 Replies)
Discussion started by: charles33
4 Replies
8. Shell Programming and Scripting
Hi,
I need helping in finding some of the text in one file and some columns which have same column in file 1
EG
cat file_1
aaaa
bbbb
cccc
dddd
eeee
fffff
gggg
hhhh
cat file_2
aaaa,abcd,effgh,ereref,name,age,sex,...........
bbbb,efdfh,erere,afdafds,name,age,sex.............. (1 Reply)
Discussion started by: jpkumar10
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
Hi all
i need your help .. I am having a multiple file in directory and i have find out the Rcopy word from these files and need to print those files which contains the Rcopy word
Thanks and regards
Vijay sahu (2 Replies)
Discussion started by: vijays3
2 Replies