the following simple scripts work fine on linux but fail on solaris:
#!/bin/bash
eval /usr/bin/time -f \'bt=\"%U + %S\"\' ./JUNK >> ./LOG 2>&1
cp ./LOG ./LOG_joe
LC_joe=`cat ./LOG | wc -l`
LC_joe=`echo $LC_joe-1|bc`
tail -1 ./LOG > ./tmp
head -$LC_joe ./LOG_joe > ./LOG
rm ./LOG_joe
where JUNK is:
#!/bin/bash
#sleep 9
gzip junk.tar
echo This is the app
hostname
#junk.tar size 805058560
The output files on linux are:$cat LOG
This is the app
localhost.localdomain
$cat tmp
bt="75.12 + 1.99"
The output files on solaris are:
$cat LOG
/usr/bin/time: illegal option -- f
$cat tmp
usage: time [-p] utility [argument...]