10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
This post is already here but want to do this with another way
Merge multiples files with multiples duplicates keys by filling "NULL" the void columns for anothers joinning files
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv:
1|123|jojo
1|NULL|bibi... (2 Replies)
Discussion started by: yjacknewton
2 Replies
2. Shell Programming and Scripting
Hello,
I have a file with 2 columns ( tableName , ColumnName) delimited by a Pipe like below . File is sorted by ColumnName.
Table1|Column1
Table2|Column1
Table5|Column1
Table3|Column2
Table2|Column2
Table4|Column3
Table2|Column3
Table2|Column4
Table5|Column4
Table2|Column5
From... (6 Replies)
Discussion started by: nv186000
6 Replies
3. Shell Programming and Scripting
Hello,
I have two text files, each with a single column,
file 1:
124152970
123899868
123476854
54258288
123117283
file 2:
124152970
123899868
54258288
123117283
122108330 (5 Replies)
Discussion started by: LMHmedchem
5 Replies
4. Shell Programming and Scripting
Hi there,
given the file
FIELD1 FIELD2 FIELD3 FIELD4 FIELD5 FIELD6 FIELD7 FIELD8 FIELD9 FIELD10 FIELD11
Why does not
awk '$6 == "FIELD6" {$6=="GREEN"}1' file
do the work and replace"FIELD6" by "GREEN"?
And second question, what is the purpose of the "1" at the end of... (5 Replies)
Discussion started by: la2015
5 Replies
5. Shell Programming and Scripting
Hi All,
I already have a code which replaces column 14 of NPBR.XTR.tmp with column 8 of NPBR3G.XTR.final
awk -F'\|' 'FNR==NR{a= $2"^"$8;next;}a{split(a,b,"^");$8=b;$14=b;}1' OFS="|" ${SHTEMP}NPBR3G.XTR.final ${SHTEMP}NPBR.XTR.tmp > ${SHTEMP}NPBR.XTR.final
I also need to replace column 15... (2 Replies)
Discussion started by: nua7
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column).
I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies
7. 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
8. UNIX for Dummies Questions & Answers
Hello,
My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns:
File A: (tab-delimited)
PDB CHAIN Start End Fragment
1avq A 171 176 awyfan
1avq A 172 177 wyfany
1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies
9. Shell Programming and Scripting
Hi,
here is my input
TEST-SAM-A6ZZ SM-S6KV 0 0 2 1 2 3 3 3 2 2 2 2 1 1 2 2 1 3 1 3
1361 SM-HA4Q 0 0 2 1 3 3 3 3 2 2 2 2 1 1 2 2 1 3 3 3 4 2 4 2 2
276217 SM-H9ZG 0 0 2 2 3 3 3 3 2 2 2 2 1 1 2 2 3 3 1 3 2 2 2 2
GC15458 SM-HAQX 0 0 2 1 2 3 1 3 2 2 2 2 1 1 2 2 1 3 1 3 2 2 2
18331 SM-HA5E 0 0 2 2... (2 Replies)
Discussion started by: genehunter
2 Replies
10. Shell Programming and Scripting
I am not that good with AWK. Is there a simple awk command I could use to get the word "this" from the following text besides using "awk -F ":" '{print $2} | awk -F " " '{print $1}"?
:this is:that is: (6 Replies)
Discussion started by: 2dumb
6 Replies