See "
man printf" - you need "
%%" for a literal percent character.
But removing a percent sign just to re-add it again makes no sense, nor mixing grep/awk/sed like that (any one of them can do it with a single command) - and if you check "
man df" you'll see you can simply specify the column you want, then use just sed to delete the headers (no idea why there isn't a df parameter to suppress that.)
Also, instead of embedding a variable you should use printf how it is intended to be used:
Code:
printf 'Root partition %s full.' $(df --output=pcent / | sed 1d)
or
Code:
CURRENT=$(df --output=pcent / | sed 1d)
printf 'Root partition %s full.' "$CURRENT"
In your second example, the body is empty because there is no body - you must separate it from the headers with two lines, as in your first example.