Re: OT: A question about bash scripting
On Mon, Oct 29, 2012 at 6:57 AM, Ralf Mardorf
<ralf.mardorf@alice-dsl.net> wrote:
> Hi :)
>
> how can I get rid of the variable "seconds"?
>
> ((seconds=(done-started)-(((done-started)/60)*60)+100))
> min_sec=$(((done-started)/60))":"${seconds: -2}
> ^^^^^^^ the math should replace the
> variable.
>
> ### Killall and Restore session
> started=$(date +%s)
> bash "$song_path/session/start-session-$startversion"
>
> ### Time
> month=$(date +%B)
> mon=$(date +%b)
> d_y_t=$(date '+/%d/%Y %T')
> done=$(date +%s)
> ((seconds=(done-started)-(((done-started)/60)*60)+100))
> min_sec=$(((done-started)/60))":"${seconds: -2}
> echo
> echo "Attended time to restore session: $min_sec"
> echo -n "Session restored at " ; printf %9.9s $month ; echo $d_y_t
> echo
>
> TIA,
> Ralf
>
>
Ralf,
I don't understand.
What are you wanting to do with the script?
If you don't like the name of the variable, make up another one.
Wolf
--
This Apt Has Super Cow Powers - http://sourcefreedom.com
Open-Source Software in Libraries - http://FOSS4Lib.org
Advancing Libraries Together - http://LYRASIS.org
Apache Open Office Developer wolfhalton@apache.org
Reply to: