9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to use awk to remove a line only if $1 contains either ; or :. Thje awk below runs but no lines are removed. Thank you :).
awk
awk '$1 !~ /;/ || $1 !~ /:/ { print }' file
file
AARS2;TMEM151B 1
AASS 2
ABAT 3
ABCA1 3
ABCA10 1
ABCA12 2
ABCA13 1
ABCA13:AX746840 2
ABCA2 5 (5 Replies)
Discussion started by: cmccabe
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have an output file like below:
php1od711,db1,2300
php1od711,db2,2400
php1od711,db3,2500
php1od711,db4,2600
php1od712,dba,3300
php1od712,dbb,3400
php1od712,dbc,3500
php1od712,dbd,3600
php1od713,zz1,4300
php1od713,zz2,4300
php1od713,zz3,4300Is there an awk/sed trick to... (1 Reply)
Discussion started by: newbie_01
1 Replies
3. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I've got a file that has 12 fields. I've merged 2 files and there will be some duplicates in the following:
FILE:
1. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, 100
2. ABC, 12345, TEST1, BILLING, GV, 20/10/2012, C, 8, 100, AA, TT, (EMPTY)
3. CDC, 54321, TEST3,... (4 Replies)
Discussion started by: tugar
4 Replies
5. Shell Programming and Scripting
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Discussion started by: vivek d r
1 Replies
6. Shell Programming and Scripting
Hi Guys
I have the following file
Essentially, I am trying to find the right awk/sed syntax in order to produce the following 3 distinct files from the file above:
Basically, I want to print the lines of the file as long as the second field of the current line is equal to the... (9 Replies)
Discussion started by: moutaye
9 Replies
7. Shell Programming and Scripting
I'm trying to use sed to remove the value of one field from another field. For example:
cat inputfile
123|ABC|Generic_Textjoe@yahoo.com|joe@yahoo.com|DEF
456|GHI|Other_recordjohn@msn.com|john@msn.com|JKL
789|MNO|No_Email_On_This_One|smith@gmail.com|PQR
I would like to remove the email... (2 Replies)
Discussion started by: bribri87
2 Replies
8. Shell Programming and Scripting
Hello to all,
I have this file
2002 1 23 0 0 2435.60 131.70 5.60 20.99 0.89 0.00 285.80 2303.90
2002 1 23 15 0 2436.60 132.90 6.45 21.19 1.03 0.00 285.80 2303.70
2002 1 23 ... (6 Replies)
Discussion started by: joggdial3000
6 Replies
9. Shell Programming and Scripting
I've been using a lot of awk lately for csv files.
But I've been using awk for csv files that contain 32 fields per line.
For the first time, I've been given a csv file that contains one field per line (13 fields in each csv file).
I need to check that a specific field, or line contains a... (2 Replies)
Discussion started by: yongho
2 Replies