Is it possible to echo a backspace in bash?
Something like
echo $'stack\b'
Shouldn’t output stac? Or I’m missing something?
More specifically, I’d like to use that in:
ls | wc -l; echo $'\b items'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\bmakes the cursor move left, but it does not erase the character. Output a space if you want to erase it.For some distributions you may also need to use
-eswitch ofecho:So it will look like
Also,
files=(*) ; echo "${#files[@]} items".