Skip to main content

Thread: Need help. Simple Shell-script. Time > out.txt


hey there. how can make script work?
here damn peace of code.
code:
function func_x()  {  echo `date`  sleep 1  echo `date`  sleep 1  echo `date`  sleep 1  }    time -f %e -o t_out.txt func_x
what gotta write info running function-time external file.

thanx.

why using function?
can trying achieve in 1 line of [messy] commands:
code:
echo `date`; sleep 1; echo `date`; sleep 1; echo `date`; sleep 1
if assigned variable:

code:
function=`echo `date`; sleep 1; echo `date`; sleep 1; echo `date`; sleep 1`
then use $function run commands


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [other] Need help. Simple Shell-script. Time > out.txt


Ubuntu

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support