S
swangdb
I want to run some unix commands from a perl script.
This works, it prints out all lines that don't begin with a # in the
file $ALIASES:
***
$temp = "egrep -v \^# $ALIASES";
system($temp);
***
This doesn't work, it tries to take the egrep output and cut out part
of it:
***
$temp = "egrep -v \^# $ALIASES | cut -d: -f1";
system($temp);
***
I get the following output:
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
How can I make this work?
Thanks!
This works, it prints out all lines that don't begin with a # in the
file $ALIASES:
***
$temp = "egrep -v \^# $ALIASES";
system($temp);
***
This doesn't work, it tries to take the egrep output and cut out part
of it:
***
$temp = "egrep -v \^# $ALIASES | cut -d: -f1";
system($temp);
***
I get the following output:
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
How can I make this work?
Thanks!