Or you can use bash to remove matched strings from a variable, e.g...$ JUNK="item1 item2 item3"
$ JUNK=${JUNK//item2/}
$ echo $JUNK
item1 item3
$ JUNK=${JUNK//item3/}
$ echo $JUNK
item1
Perhaps a problem with the output format, otherwise I don't see any problems...awk -v a=50.5555333 -v b=20.00 -v OFMT=%.7f 'BEGIN{print a - b}'...gives...
30.5555333
You can "comment" several lines in a script like this...
command1
: << COMMENT!
command2
command3
COMMENT!
command4
This prevents command2 and command3 from running.
The trouble is, you now have 5 tab-separated fields instead of 4, or you may have 6 or 7, depending on the address data.
What you would need to do is define an output record with a fixed number of address lines, e.g. assuming a maximum of 3 lines....gawk '
BEGIN {
ORS = RS = "\n\r"...
This changes any "\n" to "\t" in $2...$ od -c file1
0000000 K e v i n \t 1 2 3 c h e r r y
0000020 w a y \n A p t 2 1 \t h o u s
0000040 t o n \t T X \n \r
0000050
$ gawk...
Try this logic...#----wait for file to arrive, but time out at 10am
while [[ ! -s $DATA_DIR/test2.das && $(date '+%H:%M') < 10:00 ]]
do
sleep 900
done
#----check for file
if [[ -s $DATA_DIR/test2.das ]]
then
: file arrived, do something
else
: must have timed-out, so send email
fi
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.