Linux shell scriptredirect stdoutstderr;getchar in Linux shell

it2022-05-05  132

Linux shell script

 

1. redirect stdout/stderr  

 

 

$yourshellscript 1>outputfile   2>&1

 

2. getchar in Linux shell for fileentry  in `find  $CVSROOTFOLDER    -maxdepth 1 -type d   ! -name "CVSROOT"   ! -name "CVS-Root"     -print`   do     if [ -d $fileentry ]; then         i=`expr $i + 1`         echo "$i ####start " $fileentry           convertmycvs $fileentry       read -p "Press any key to continue."     fi   done


最新回复(0)