Search Results

Search: Posts Made By: montour
3,164
Posted By montour
A part of my script is running conditionally...
A part of my script is running conditionally ('if' statement), and I want to filter out (by means of 'grep -v') an expression from the whole block which can be a result of several commands.

But...
3,164
Posted By montour
Thanks for your quick responses, really...
Thanks for your quick responses, really impressing...

So there's no chance to exit the script from within the if-condition block, when the result is piped?
3,164
Posted By montour
Bash won't exit as expected
Hi there,

following code snippet should output nothing, IMHO. But the result is "THE END".
#!/bin/bash

if true ; thenexit
fi | grep "somesearchstring"

echo "THE END"using bash 4.1.9(1)
...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 03:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy