LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-14-2010, 02:23 AM   #76
grail
Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 7,692

Rep: Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987

Well I am not sure what the you had planned with the following line:
Code:
ls $variable || grep -i / credit card
But I believe your if was almost there:
Code:
if grep -q "credit card" "$variable/*.tmp"
You need the '-q' unless you want all of what is found spewed to the output.

I am also curious as to when the input file changed so much??
I assume the crm.log is now the active input file? If so it greatly changes how this could have all been attacked, at least in my opinion.

Would you mind showing me what the expected output would be based on the crm.log you have included?

Last edited by grail; 10-14-2010 at 02:26 AM.
 
  


Reply

Tags
date, day, manipulating, sed, set


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BASH: if Variable -eq String not working worm5252 Programming 2 01-24-2010 04:07 PM
Get value for variable name defined as string webquinty Programming 4 11-18-2009 06:30 AM
Help: removing a variable substring from a string variable in sh script gnparsons Programming 2 06-04-2008 06:21 PM
variable to string x2000koh Programming 4 07-30-2003 03:23 AM
Getting a variable name based on a string. jtshaw Programming 7 10-08-2002 03:06 PM


All times are GMT -5. The time now is 12:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration