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,
I'm trying to copy and paste the sixth column from a bunch of files into a single file having each column pasted in separate columns (and not one after each other in just one column.)
I tried this code but works only partially because it copied and pasted 50 rows of each column... (6 Replies)
Discussion started by: Frastra
6 Replies
3. 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
4. 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
5. Shell Programming and Scripting
I am working on a file with several columns as below
MO_NAME,FAULT_TYPE,CLASS,CODE1,CODE2,CODE3
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2A,53,58
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2B,24
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2A,33
RXOCF-101,BTS INTERNAL,FAULT CODES CLASS 2D,57 ... (12 Replies)
Discussion started by: Rizwan Rasul
12 Replies
6. 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
7. 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
8. Shell Programming and Scripting
Hi,
Input
7488 7389 chr1.fa chr1.fa
3546 9887 chr5.fa chr9.fa
7387 7898 chrX.fa chr3.fa
7488 7389 chr21.fa chr3.fa
7488 7389 chr1.fa chr1.fa
3546 9887 chr9.fa chr5.fa
7898 7387 chrX.fa chr3.fa
Desired Output
7488 7389 chr1.fa chr1.fa 2
3546 9887 chr5.fa chr9.fa 2... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
9. Shell Programming and Scripting
I have a one-line command,
lsusb | awk '{ $1=""; $2=""; $3=""; $4=""; $5=""; $6=""; print $0 }'
It works, and gives the results I expect, I was just wondering if I am missing some easier way to nullify the first 6 column variables?
Something like,
lsusb | awk '{ $(1-6)=""; print $0 }'
But... (10 Replies)
Discussion started by: AlphaLexman
10 Replies
10. Shell Programming and Scripting
hi friends!
i have a script where a execute a veritas command, available_media wich retrieves me a list of tapes .lst
then i execute
cat /tmp/listtapes.lst | grep -v VL |sed '/^$/d'|awk -F, '{print $1, $3, $4, $9}
' > /tmp/media1.lst
but it prints all the columns instead of the four... (3 Replies)
Discussion started by: pabloli150
3 Replies