Jari Aalto wrote: > This is fine for interactive use, but not convenient in shell scripts, > because the outpur cannot be easily handles. Many times only the > integer value is needed: > > lines=$(wc -l $file) > > if [ $lines > $max ]; then # ERROR! > ... do something > fi
If you don't want the filename displayed just use stdin: lines=$(wc -l <$file) Brian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]