Hallo Andreas,
Schalte einfach ein
wc -l
danach.
success=$( | wc -l)
if [$success -ge 1];
then
echo „Yo!“
fi
… da erhalte ich die Fehlermeldung
wc: illegal option – 1
usage: wc [-c|-m] [-lw] [name …]
mit
man wc
erhalte ich folgende Erklärung (die mich aber auch nicht weiterbringt)
wc - count words, lines, and bytes or characters in a file
SYNOPSIS
wc [-c|-m] [-lw] [file]…
DESCRIPTION
The wc command counts lines, words, and bytes or characters in the
named files, or in the standard input if no file names are specified.
It also keeps a total count for all named files.
A word is a string of characters delimited by spaces, tabs, or
newlines.
Options
wc recognizes the following options:
-c Report the number of bytes in each input file.
-m Report the number of characters in each input file.
-w Report the number of words in each input file.
The c and m options are mutually exclusive. Otherwise, the l, w, and
c or m options can be used in any combination to specify that a subset
of lines, words, and bytes or characters are to be reported.
When any option is specified, wc reports only the information
requested. If no option is specified, the default output is -lwc.
When a file is specified on the command line, its name is printed
along with the counts.
(HP-UX Release 11.00: October 1997 )
Gruß,
Nina