Skip to content

Conversation

@ebutusov
Copy link

… to exit with error)

For some reason in Debian Buster (RPI4) awk returns number in scentific notation, e.g.:

#nrasp /home/pi/lab/shrinkwrap # cat /tmp/fdisk_new.log | grep "83 Linux" | awk '{print ($3+1)*512}'

4.5216e+09

This causes truncate command to exit with error, as it doesn't understand the scentific notation. The workaround is simple to use printf with float format (%d - integer is too small) and cut off decimal places.

Copy link

@not-eexto not-eexto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants