Search Results

Search: Posts Made By: ikeQ
16,830
Posted By ikeQ
I use tail -f because the file the script check...
I use tail -f because the file the script check will grow, the task is to handle the growing content in the file.
but since using tail -f is not wise because I have no idea how to put it in to a...
2,407
Posted By ikeQ
running script without a path
can someone tell me how could I run a script in an environment that does not include a path? like the environment provided by cron?
16,830
Posted By ikeQ
I want to put `tail -f filename | grep -i -E...
I want to put `tail -f filename | grep -i -E 'error|warning'` into a variable and construct an e-mail that report any lines that contain "error" or "warning", after that, I will send the mail to the...
16,830
Posted By ikeQ
using "tail -f" in script
I am trying to use this script however it is not running well


#!/bin/sh
tail -f filename | grep -i -E 'error|warning'

the code does not display the first 10 lines of the file that I want to...
2,717
Posted By ikeQ
command line arguments
hi, can someone how to accept command line arguments as a variable using in script?
like: ./scriptname arguments
by accept arguments, I can use it in my script?

thx!
2,308
Posted By ikeQ
thanks, but can u make it grep like ERROR error...
thanks, but can u make it grep like ERROR error Error eRRor .... any other combination of upper and lower case letters
2,308
Posted By ikeQ
Using grep and awk
hi, all
I am trying to write a script to find all lines that contain error or warning ( include any type of error, i.e Error erRor ERROR...)

here is the file I need to grep:



May 3...
1,718
Posted By ikeQ
Thanks a lot, I have try many times but it didn't...
Thanks a lot, I have try many times but it didn't work only because of the spelling!!!

Anyway,Thanks!
1,887
Posted By ikeQ
Help with string and substring also I/O
#!/bin/sh

PRINTF=/usr/bin/printf
PASSWD=/etc/passwd

$PRINTF "Enter a UserID\n"
read USERID

if [ -z "`grep "^$USERID:" $PASSWD`" ]; then
$PRINTF "$USERID does not exist, please...
1,718
Posted By ikeQ
Help with string comparison
#!/bin/sh
PRINTF=/usr/bin/printf
MACHINE_NAME=`uname -n`
TIME=`date +"%H"`

$PRINTF "Welcome to $MACHINE_NAME. What is your name?\n"
read NAME

if [ $TIME -lt 12 -a $TIME -gt 0 ]; then
...
1,915
Posted By ikeQ
Thx for u help. BTW, is there any files that...
Thx for u help.

BTW, is there any files that map userid to home directory and other information?
1,915
Posted By ikeQ
Help me with awk and grep script
#!/bin/sh
PRINTF=/usr/bin/printf

$PRINTF "Enter a UserID\n"
read USERID

for USERID in `cat passwd | awk -F : '{print $1}'`
do
USERHOME=`grep ^$/qianxin/ passwd | awk -F : '{print $6}'`...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 02:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy