bash: write a single character to a file?

mlnpscda
mlnpscda used Ask the Experts™
on
In bash, is there an easy way to write a single character to a file?  Without the \n appended ?
I'm trying to just write a '.' (period, dot, whatever you want to call it) to a logfile when every iteration completes, so there will just be (hopefully) just a sequence of dots going across the screen until the iterations are complete (or something breaks).

No big, not critical, just be a nice to have.

Thanks,
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
echo -n "."
Commented:
Umm... to a file...

echo -n "." >>logfile
Top Expert 2007

Commented:
The first solution is the best.  An alternative is

echo -e ".\c" >file

Author

Commented:
Thanks!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial