10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Im trying to search for a single variable in the first field and from that output use awk to extract out the lines that contain a value less than a value stored in another variable. Both the variables are associated with each other.
Any guidance is appreciated.
File that contains the... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
2. Shell Programming and Scripting
I have a lot of files with keywords and unique names. I'm using a shell script to refer to a simple pattern file with comma separated values in order to match on certain keywords. The problem is that I don't understand how to handle the wildcard values when I want to skip over the unique names.
... (5 Replies)
Discussion started by: abercrom
5 Replies
3. Shell Programming and Scripting
Hi All,
When i am logged into a server , i am able to assign grep value to a variable as follows.
VAR=`grep 'Listener stopped' /logs/perf.log`
However, when i log out of the server, and try to execute the following command by first SSHing into server, it throws error.
$ VAR=`ssh Server... (4 Replies)
Discussion started by: srkmish
4 Replies
4. Shell Programming and Scripting
Hi Guys,
I want to set a variable which happend to have square brackets in them. I tried multiple ways that is by escaping it with quotes (both single and double ) but it didn't help.
All I want is:
set x = slicearray.slice\.post
My failed attempts were:
set x = "slicearray.slice\.post"... (3 Replies)
Discussion started by: dixits
3 Replies
5. Shell Programming and Scripting
Hello Team,
I have a script which will grep for a time from a file. I have following code to grep for a time in a file.
node=`hostname`
current_date=`date`
file11=weblogic.log
next_date=`date '+%b %e, %Y'`
next_date_time11=`grep -i "${#next_date}" ${file11}| tail -1 | awk... (3 Replies)
Discussion started by: coolguyamy
3 Replies
6. Shell Programming and Scripting
Hi All,
I have a text file which looks like this:
computer programming
systems engineering
I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this:
computer programming
systems engineering
I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
7. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
8. Shell Programming and Scripting
Hi
I am having hard time getting this right and need some help. I Have several log files, and everyone contains the following 3 lines at the end:
4 ETW000 Disconnected from database.
4 ETW000 End of Transport (0000).
4 ETW000 date&time: 13.01.2011 - 08:03:28
I need to capture the value... (7 Replies)
Discussion started by: nimo
7 Replies
9. Shell Programming and Scripting
Hello,
I would like for the user to input the date for a particular log file, then have the input sent to a variable, which is then used via grep to extra the logs for the specific date the user request.
I did some searching, but I still don't understand why I'm not seeing any result.
... (4 Replies)
Discussion started by: ravzter
4 Replies
10. UNIX for Dummies Questions & Answers
I need to pass a parameter that will then be grepped.
I need it to grep /paramater and then have a space
so if 123 was passed my grep would be grep '/123 ' sample.log
this works fine from the command line
but when i try and set it searchThis="/$2 "
and then run grep $searchThis... (6 Replies)
Discussion started by: magnia
6 Replies