Search Results

Search: Posts Made By: mbketan
2,407
Posted By mbketan
hopefully this is what you need....and write it...
hopefully this is what you need....and write it in a script

read my_value
new_val=`echo ${my_value}_TOP`
#And new_val is what you can use do your next job

cheers
1,665
Posted By mbketan
setting 'bin on' helps sending compressed files...
setting 'bin on' helps sending compressed files also.
5,120
Posted By mbketan
great.....learning lot of things here... ...
great.....learning lot of things here...

ygor...i am trying to learn one line awk....

cheers
5,756
Posted By mbketan
changing IFS is a good solution....
changing IFS is a good solution....
5,120
Posted By mbketan
this works fine if split count is known i.e. {1}...
this works fine if split count is known i.e. {1} , {2}.....but if it is unknown then it can not work...
5,120
Posted By mbketan
one method is to use awk if the pattern position...
one method is to use awk if the pattern position is known.....little lengthy....but works fine....

awk '{
if(substr($0,1,5)=="pattern")
{
fn="outfile" n++
print $0 >> fn
}...
8,865
Posted By mbketan
check for FILES existence
Try this

for i in `ls -1`
do
if [ -s $i ]
then
echo "file exist"
fi
done
4,547
Posted By mbketan
search log
if [ `grep "999 upload failure" log1 log2 log3 log4 | wc -l` -gt 0 ]
then
echo fail
fi
18,284
Posted By mbketan
Concatenate it
Another solution :

for i in `cat tt`
do
if [ `echo $i | cut -c1-1 ` = "," ]
then
prevline="$prevline$i"
else
echo $prevline
prevline=$i
fi
done
echo...
Showing results 1 to 9 of 9

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