• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • The forum software that supports hummy.tv has been upgraded to XenForo 2.0!

    This is a major upgrade which changes the look and feel of the forum somewhat but brings a host of improvements too. Please bear with us as we continue to tweak things and report any issues or suggestions in Site/Forum Issues.

sed...

xyz321

Well-Known Member
#2
Me too : ) Unfortunately, awk isn't available during boot, use sed instead.
I was going to suggest something like this in order to overcome the 5% error due to the ext3fs reserved blocks.
Code:
display `df /dev/sda2 |awk '(/^\/dev/){printf ("%d%%\n",$3/$2 * 100)}'`
 

af123

Administrator
Staff member
#11
Happy to continue the conversation, but probably not here!

@Mods - would you mind splitting this thread from post 75 to the Hummy Arms please?
 

af123

Administrator
Staff member
#12
Don't learn bash, learn Bourne shell (sh). You can always learn the Bash extensions later.

<rant>
I'm tired of people coming for interview for jobs involving shell programming (we don't use bash) and not realising the difference!
They're the same people who almost invariably tell us that our "Up arrow is broken"* and the "Cursor keys aren't working in vi" (and also tend to pronounce vi as in vie instead of Vee Eye).
</rant>

* - we aren't allowed to use any shell with a history due to security policy constraints.
 

af123

Administrator
Staff member
#13
Right - we can rant away to our heart's content now... or is that just me?
(Thanks for moving the posts Brian)