AnotherAlan
Technical User
Hi All,
I'll try and explain this as best I can.
I have written this;
ssh -n $h "/bin/test -d $core2 && find $core2 -mtime -1"
This finds all core dumps from the previous 24 hours. (Well I hope it does)
What I would like to achieve is finding a way to check if this returns a null value. i.e. There were no core files for that particular host.
I've toyed with the idea of assigning the ssh command to a variable...this works but is not great, it prints all to one line and then I have to mess around with awk to seperate.
My understanding is that unlike grep, find always returns a $?=0.
I'm a bit stumped. All suggestions to eliminate the variable|awk route most welcome.
Thanks
Alan
I'll try and explain this as best I can.
I have written this;
ssh -n $h "/bin/test -d $core2 && find $core2 -mtime -1"
This finds all core dumps from the previous 24 hours. (Well I hope it does)
What I would like to achieve is finding a way to check if this returns a null value. i.e. There were no core files for that particular host.
I've toyed with the idea of assigning the ssh command to a variable...this works but is not great, it prints all to one line and then I have to mess around with awk to seperate.
My understanding is that unlike grep, find always returns a $?=0.
I'm a bit stumped. All suggestions to eliminate the variable|awk route most welcome.
Thanks
Alan