hello forum members,
I have a script which is used find the Uname and passwords and redirects into a output.txt file.I hardcoded a string "ciadev" but iwant search two more strings also "absdev" and "absprod" So modify this script please.
I am lookinmg forward from you,
please find the below script.
#! /bin/ksh
echo "Weclome"
if [ -d final ]
then
rm -rf final #clean the exsisting o/p file
mkdir final
echo ""User id" "Password" " >final/output.txt
else
mkdir $HOME/final
echo ""User id" "Password" " >final/output.txt
fi
for TEMP in `find . -type f`
do
if [ "$TEMP" != "$0" ]
then
op=`grep Ciadev $TEMP | cut -d '-' -f 3,4 | sed 's/uCiadev/Ciadev/g' | sed 's/-P//g'`
echo $op >> $HOME/final/output.txt
fi
done
echo "show over bye"
Thanks in Advance
Rajkumar g