Search Results

Search: Posts Made By: Chrismcq
2,708
Posted By Chrismcq
I tend to use for loops for this kind of thing :-...
I tend to use for loops for this kind of thing :-

for file in `cat /etc/usr/bin/removefilelist`
do
rm -f "$file"
done
5,641
Posted By Chrismcq
Surely to remove a channel, you need to ...
Surely to remove a channel, you need to


grep -v "$channel_remove" channels.txt > channels.NEW
mv channels.NEW channels.txt


ps - just noticed the sed command that Demas had posted which...
860
Posted By Chrismcq
If you would prefer the contents emailed as an...
If you would prefer the contents emailed as an attachment rather than within the body of the message :-


ls -l > dirlist
echo "Please find the attached directory listing" | mailx -s "direcory"...
594
Posted By Chrismcq
Hi - you probably don't need this now, but here...
Hi - you probably don't need this now, but here is another way :-


num=`cat testfile | wc -l`
echo $num
if [ $num -gt 150 ]
then
echo "Condition Success"
else
echo "Condition Failed"...
1,534
Posted By Chrismcq
This will work :- found=0 if [ -s A123.rej...
This will work :-

found=0
if [ -s A123.rej ]
then
found=1
fi

if [ -s A345.rej ]
then
found=1
fi

if [ $found = 0 ]
then
echo "No Data"
else
echo "Data found"
fi
885
Posted By Chrismcq
Hi - I may be missing the point here, but if it...
Hi - I may be missing the point here, but if it is only the first update line that you are interested in, you could simply do the following :-

grep "Update completed" MyLogFile | head -1
Is this...
Showing results 1 to 6 of 6

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