Search Results

Search: Posts Made By: p_satyambabu
1,546
Posted By MadeInGermany
Replace the for loop and list from `subshell` by...
Replace the for loop and list from `subshell` by a while loop - simple&safe

while read b a
do
...
done < limit.csv
3,771
Posted By research3
hi try this one egrep -rl 'scp|ftp' *.txt ...
hi try this one
egrep -rl 'scp|ftp' *.txt

i hope that help
3,771
Posted By Scott
Hi. You could try egrep (without the -E...
Hi.

You could try egrep (without the -E option), or use awk or sed for this:


$ sed -n "/^scriptname=/ s/.*=//p" tciftp01.sh
ftp01.sh
3,771
Posted By kshji
fva* = command shell make filegeneration before...
fva* = command shell make filegeneration before find, result is not maybe what you are trying.
"fva*" = argument for find, no filegeneration.

# not so good
find /path -name fva* -exec ls -lrt...
Forum: Solaris 05-10-2010
5,305
Posted By hergp
ls -lrt tpa* > x.xls 2>/dev/null if [ ! -s...
ls -lrt tpa* > x.xls 2>/dev/null
if [ ! -s x.xls ]
then
echo No jobs available which starts with tpa*
fi

The redirection of stderr ( 2>/dev/null ) suppresses the error message (no such...
3,771
Posted By kshji
ls -lrt tpa* > x.xls 2>/dev/null || echo "No jobs...
ls -lrt tpa* > x.xls 2>/dev/null || echo "No jobs available which starts with tpa*"

Or like

if ! ls -lrt tpa* > x.xls 2>/dev/null
then
echo "No jobs available which starts with tpa*"...
3,771
Posted By rwuerth
You would have to redirect 'stderr' to a file for...
You would have to redirect 'stderr' to a file for the 'ls' command so that the message does not display when there is an error in the script.

After running the command, you can either check the $?...
3,771
Posted By anbu23
ls -lrt tpa* > x.xls 2>/dev/null if [ $? -eq 2...
ls -lrt tpa* > x.xls 2>/dev/null
if [ $? -eq 2 ]; then echo "No jobs available which starts with tpa*"; fi
Forum: Solaris 05-07-2010
5,305
Posted By jlliagre
for i in $(awk '{print $3}' file | uniq) do ...
for i in $(awk '{print $3}' file | uniq)
do
echo $i:
grep " $i " file | awk '{print $9}'
done
Forum: Solaris 05-07-2010
5,305
Posted By amitranjansahu
awk ' { print $3 } ' filename
awk ' { print $3 } ' filename
Showing results 1 to 10 of 10

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