Search Results

Search: Posts Made By: Cochise
5,717
Posted By MadeInGermany
\| is GNU sed. Standard sed is either sed -n...
\| is GNU sed.
Standard sed is either
sed -n '/chuser \"gecos=/{s/^ *skipping: //;s/ (TESTMODE) *$//;p;}' modify.LOG | sort -u | ksh -vor
sed '/chuser \"gecos=/!d;s/^ *skipping: //;s/ (TESTMODE)...
5,717
Posted By bakunin
In principle you can use any process which output...
In principle you can use any process which output are code-lines and pipe that in ksh (or any other shell i know, for that matter):

typeset -i iCnt=0

while [ $iCnt -le 10 ] ; do
print -...
5,717
Posted By RudiC
Not sure if I understood your requirements...
Not sure if I understood your requirements correctly, but this should do the job:sed -nr '/chuser \"gecos=/ s/skipping: |\(TESTMODE\)//gp' modify.LOG | sort -u | tee /dev/tty | sh
You could use ksh...
1,383
Posted By Scrutinizer
See also answer #4
See also answer #4
1,383
Posted By Corona688
This is bad: printf...
This is bad:

printf "${some_arbitrary_variable}\n"

This is how it's intended to be used:

printf "%s\n" "${some_arbitary_varible}"
17,817
Posted By Peasant
Perhaps something like : find / -type f...
Perhaps something like :

find / -type f -name '*.sh' -exec head -1 {} /dev/null \; | awk '/bash/ { print file } { file = $0 } '
2,358
Posted By MadeInGermany
If not too many matching lines, store them in a...
If not too many matching lines, store them in a variable!

special=`grep somestring somefile`
if [ -n "$special" ]
then
echo "$special" | mail ...
fi
---------- Post updated at 12:58 PM...
2,358
Posted By Makarand Dodmis
your problem solved... tryvar=$(grep somestring...
your problem solved...
tryvar=$(grep somestring somefile) && [[ ! -z "${var}" ]] && echo "${var}"|mailx -s "Found something" email@mycomp.com
Courtesy : Pilnet
Showing results 1 to 8 of 8

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