10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
2. Shell Programming and Scripting
Hi All
I am having one awk and sed requirement for the below problem.
I tried multiple options in my sed or awk and right output is not coming out.
Problem Description
###############################################################
I am having a big file say file having repeated... (4 Replies)
Discussion started by: kshitij
4 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
i have 2 strings with values below which are read from a file
1 ---> end
2 ---> string(1)newline="\n";
which need to be compared inside an if block as below
if \\n\"\;" ]
then
echo "pattern match"
fi
but the above code is not working (1 Reply)
Discussion started by: cvsanthosh
1 Replies
5. 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
6. Shell Programming and Scripting
Hello all,
I have written a perl script which searched for a file in a folder, and return the value found or not found.
The file that we are getting is a weekly file and everyweek, the date changes.
So for this i have written a file pattern matching script, but i am not getting the... (4 Replies)
Discussion started by: msrahman
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
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
9. Shell Programming and Scripting
Hi,
I am trying to replace a specific column values in a csv file with double quotes.
Example:
SNO,NAME,ZIPCODE,RANK,CARE_OF
1,Robert,74538,12,RICHARD JOHNSON, P.C
2,Sam,07564,13,% R.S MIKE, V.K.S
3,Kim, Ed,12345,14,@90 KMS, %TK
Desired Output:
SNO,NAME,ZIPCODE,RANK,CARE_OF... (1 Reply)
Discussion started by: techmoris
1 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