good day all
this is part of a larger function, but I get this error and can't figure out what is the problem:
script name "connected.sh"
running this
cat "$logfile" | grep "$searchstring"
returns results perfectly, however when I insert this into the bash function, with the following code: (this is line 41, line 40 I create the tempout file & 41 is a simple echo)
"$(cat "$logfile" | grep "$searchstring")" >> "$tempout"
this is printed in the terminal:
./connected.sh: line 41: Fri Nov 6 14:29:14 2015 us=68416 xyz/x.x.x.x.184:44595 MULTI: primary virtual IP for xyz/x.x.x.x:44595: 10.0.0.12
Fri Nov 6 14:29:27 2015 us=606987 xyz/x.x.x.x:40223 MULTI: primary virtual IP for xyz/1x.x.x.x:40223: 10.0.0.10
Fri Nov 6 15:46:58 2015 us=712031 xyz/x.x.x.x4:54911 MULTI: primary virtual IP for xyz/x.x.x.x:54911: 10.0.0.12: No such file or directory
what is causing this "./connected.sh: line 41: ... No such file or directory"