BW-userx |
06-07-2017 03:22 PM |
how to put two operations on one line execution?
How do I put this into one line?
Code:
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> fs=$(stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3")
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> echo $fs
319616
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> size=$(($fs/1024))
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> echo $size
312
Can it even be done?
Code:
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> size=$($((stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3"))/1024)
bash: stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3": syntax error: invalid arithmetic operator (error token is ""Elvis Costello-Tramp The Dirt Down.mp3"")
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> fs=$(size=$((stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3"))/1024)
bash: stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3": syntax error: invalid arithmetic operator (error token is ""Elvis Costello-Tramp The Dirt Down.mp3"")
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡> fs=$($size=$((stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3"))/1024)
bash: stat -c%s "Elvis Costello-Tramp The Dirt Down.mp3": syntax error: invalid arithmetic operator (error token is ""Elvis Costello-Tramp The Dirt Down.mp3"")
userx%slackwhere ⚡ The Very Best Of Elvis Costello Disc 1 ⚡>
|