There's a problem here. Suppose you call the function like this: find_lines some words
The arguments of grep will be: "some" "words" "$FILENAME", but grep will interpret "words" a file, not a pattern to search for.
If you change it to "$*", then "some words" would be passed as one argument.
Also, you may want to add switch -q to grep to avoid printing the grep output.
In this example function below, I cannot figure out what certain parts mean.
if ! echo $PATHwhat is "if !"?
(^|:)$1($|:) What is ^|: and$|:?
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if ; then
PATH=$PATH:$1
else... (3 Replies)
Hi,
I am sure some gurus will recognize what this graph is. This is provided by our SA but I can't understand his explanation. I am not sure if this is from kSar or Cacti. The link that I was given to is to a kSar directory so I am assuming this output is from kSar.
Hopefully, I can get a... (1 Reply)
Hi,
I am writing a shell script which will check the status of a resource in a cluster and then display nicely to a user running the script at command line.
Basically the script runs a status command and then pulls certain keywords from the return and then should display a concise status.
... (5 Replies)
Hi. I wonder what the equal sign in front of the answer means.
I have read man pages and googled but found no answer.
xntpdc -p
=15.5.64.3 15.5.2.51 3 512 377 0.02060 0.057426 0.04965Thanks.
Jan (1 Reply)
hi all,
when I run-
wcars1j5#netstat -an | grep 8090
127.0.0.1.8090 *.* 0 0 49152 0 LISTEN
wcars1j5#
1. does this mean that no one is connected to this port?
Regards,
akash (1 Reply)
Hi all,
I wanted to know the solaris way of interpreting devices?
I mean i understand all those c0t0....stuff but when i start mounting devices , most of the times i get either a I/O error or it says that the directory does not exist.
eg:
I have a external usb hub to which i have connected... (1 Reply)
We are having performance issues on an alpha4100 server.
I can't paste a snapshot of my vmstat in here, but...
We have 4gb of memory. The actual memory stays consistant around 306k. Free is dropping into the 120 area. Wire is around 206k consistantly. consistantly.
My manual says that unix... (3 Replies)
I am trying to interpret the following shellscript and am having a very difficult time. Could one of you Unix gurus pleasssseeee help me out? You just won't know how much of a life saver you would be for me.
PN=`basename "$0"` # Program name
VER=`echo '$Revision: 1.2 $' | cut -d' ' -f2`
... (3 Replies)