Bash Bunch,
Here is how I 'solved' the problem:
function traperr
{
echo "ERROR: ${BASH_SOURCE[0]} ${LINENO}"
# if BASH_SUBSHELL is 0, then script will exit anyway.
if (( $BASH_SUBSHELL >= 1 ))
then
kill $$
fi
}
I put solved in quotes because I do not really care for this so
UniXman1234 wrote:
> ./new1a < numbers.txt | grep -i -v '^a ' | grep -i -v '^the ' | grep -i -v
> '^or ' | sort -f
>
> How would I go about merging all the greps into a scripe and putting all the
> words that should be excluded into a data file
Many different ways. Look at the 'grep -f' option.
Bash Bunch,
Not surprisingly, bash does not exit the script when an error is detected in
a subshell.
I am hopeful that someone has a solution to this (other than: be careful to
not use subshells).
Here is the test run:
---
./subshellnofail.sh
BEGIN
ERROR: ./subshellnofail.sh 10
Hi everyone, im trying to make the following command line shorter by
introducing a script that join up all the grep commands
./new1a < numbers.txt | grep -i -v '^a ' | grep -i -v '^the ' | grep -i -v
'^or ' | sort -f
How would I go about merging all the greps into a scripe and putting all the
w