10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
2. Shell Programming and Scripting
Hi I am trying to find a pattern match with column one containing 3 numbers.
input file tmp.lst
abcd456|1|23123|123123|23423
kumadff|a|dadfadf|adfd|adfadfadf
xxxd999|d|adfdfs|adfadf|adfdasfadf
admin|a|dafdf|adfadfa|||
output file tmp4.lst
abcd456|1|23123|123123|23423... (3 Replies)
Discussion started by: vamsekumar
3 Replies
3. Shell Programming and Scripting
can somebody provide me with some ksh code that will return true if my the contents in my variable match anyone of these strings ORA|ERROR|SP2
variable="Error:ORA-01017: Invalid username/password; logon denied\nSP2-0640:Not connected"
I tried this and it does not seem to work for me
... (3 Replies)
Discussion started by: BeefStu
3 Replies
4. Shell Programming and Scripting
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies
5. Shell Programming and Scripting
My example file is as given below:
conn=1 uid=oracle
conn=2 uid=db2
conn=3 uid=oracle
conn=4 uid=hash
conn=5 uid=skher
conn=6 uid=oracle
conn=7 uid=mpalkar
conn=8 uid=anarke
conn=9 uid=oracle
conn=1 op=-1 msgId=-1 - fd=104 slot=104 LDAPS connection from 10.10.5.6 to 10.18.6.5
conn=2... (3 Replies)
Discussion started by: sags007_99
3 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
I am trying to sort thru a database and print all the customers whose first names are only four characters. I just want to pull the first name only from the database.
the database records appear like this in file:
Mike Harrington:(510) 548-1278:250:100:175; first is name Mike... (4 Replies)
Discussion started by: citizencro
4 Replies
7. Shell Programming and Scripting
Hi,
How can I tell awk to print all lines/columns if column number 5 contains the word Monday?
I have tried
nawk -F, '$5==Monday' OFS=, myfile > outputfile
but that doesn't work (I am a newb!!)
Thanks, (7 Replies)
Discussion started by: keenboy100
7 Replies
8. Shell Programming and Scripting
Hi guys,
got a problem here with sed on the command line.
If i have a string as below:
online xx:wer:xcv: sdf:/asdf/http:https-asdfd
How can i match the pattern "http:" and replace the start of the string to the pattern with null?
I tried the following but it doesn't work:
... (3 Replies)
Discussion started by: DrivesMeCrazy
3 Replies
9. Shell Programming and Scripting
Dear Team,
How do we match two patterns on the same line using awk?Are there any logical operators which i could use in awk like awk '\gokul && chennai\' <filename>
Eg:
Input file:
gokul,10/11/1986,coimbatore.
gokul,10/11/1986,bangalore.
gokul,12/04/2008,chennai.... (2 Replies)
Discussion started by: gokulj
2 Replies
10. Shell Programming and Scripting
In a nutshell, I need to work out how to return the last matching pattern from an awk //,// search. I can bring back the first, but am unsure how to obtain the last, and a simple tail won't work as the match could be over multiple lines.
Secondly I would like some way of pattern matching, a... (10 Replies)
Discussion started by: smb_uk
10 Replies