Mar 10, 2005 #1 peterneve Programmer Jan 24, 2002 50 GB I have a unix script which uses \c to print things on the same line, eg. echo "Doing something ...\c" # Do something echo " done." This doesn't work in linux. Any ideas anyone? Thanks
I have a unix script which uses \c to print things on the same line, eg. echo "Doing something ...\c" # Do something echo " done." This doesn't work in linux. Any ideas anyone? Thanks
Mar 10, 2005 #2 hoinz MIS Jan 29, 2004 944 DE man echo or try this: echo -e "Doing something ...\c" Upvote 0 Downvote
Mar 10, 2005 #3 olded Programmer Oct 27, 1998 1,065 US Hi: I use my echo_n function in my bash and ksh scripts. Place this at the beginning of your script: [[ "$(echo -n)" == "-n" ]] && function echo_n { echo "$@\c"; } || function echo_n { echo -n "$@"; } Upvote 0 Downvote
Hi: I use my echo_n function in my bash and ksh scripts. Place this at the beginning of your script: [[ "$(echo -n)" == "-n" ]] && function echo_n { echo "$@\c"; } || function echo_n { echo -n "$@"; }