10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
2. Shell Programming and Scripting
I'm trying to make an awk script to compare values I've set as var1, var2, and var3 earlier in the script to the values in the userinputted column of four text files called Node1.txt, Node2.txt, Node3.txt, and Node4.txt and then replace the values in that userinputted column with either ttt or gcc,... (8 Replies)
Discussion started by: Eric1
8 Replies
3. Shell Programming and Scripting
Hi Friends,
I have looked around the forums and over online but couldn't figure out how to deal with this problem
input.txt
gene1,axis1/0/1,axis2/0/1
gene1,axis1/1/2,axis2/1/2
gene1,axis1/2/3,axis2/2/3
gene2,axis1/3/4,axis2/3/4
Match on first column and if first column is... (1 Reply)
Discussion started by: jacobs.smith
1 Replies
4. Shell Programming and Scripting
Master_1.txt
2372,MTS,AP
919821,Airtel,DL
0819,MTS,MUM
919849788001,Airtel,AP
1430,Aircel MP,20
405899143999999,MTS,KRL
USSDLIKE,MTS,DEL
Master_2.txt
919136,DL
9664,RAJ
919143,KOL
9888,PUN
Input File: (4 Replies)
Discussion started by: siramitsharma
4 Replies
5. Shell Programming and Scripting
Input file:
ASD_QAW 12 A_@
AE_AQ 21 PA_123
ASDA_@ 23 ADA_AS
.
.
Output file:
ASD_QAW 12 A @
AE_AQ 21 PA 123
ASDA_@ 23 ADA AS
.
.
Do anybody know how to just specific and replace "_" in column 3 with tab delimiter (\t)?
Thanks for advice. (2 Replies)
Discussion started by: perl_beginner
2 Replies
6. Shell Programming and Scripting
Hi, I have the following data:
2860377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEGATIVE"
32340377|"DATA1"|"DATA2"|"65343"|"DATA2"|"DATA4"|"11"|"DATA5"|"DATA6"|"65343"|"DATA7"|"0"|"8"|"1"|"NEG-DID"... (3 Replies)
Discussion started by: sdohn
3 Replies
7. Shell Programming and Scripting
hi Friends
need to compare columns in one file where the data looks like below
laptop,IBM
phone,samsung
car,rental
user1,laptop
user2,laptop
user3,phone
want to get output as
laptop,IBM
phone,samsung
car,rental
user1,IBM
user2,IBM
user3,samsung
need to seach $2 in array of $1 and... (4 Replies)
Discussion started by: arun1401
4 Replies
8. Shell Programming and Scripting
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies
9. Shell Programming and Scripting
dear all,
I'm trying to use Awk to eliminate the last two characters from the first column in a file. This two characters are "-1" and I need to eliminate them from each row that I have in the files. The files have two columns and look like:
ID_090-1 2
ID_3787-1 4
ID_0098-1 1
ID_12-1 4
I... (4 Replies)
Discussion started by: gabrysfe
4 Replies
10. Shell Programming and Scripting
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies