I understand what this command is saying or doing but I want to know what the :\c means?

print "Running Tests (this might take a while):\c"
  • ):\c seems a cow. Perhaps it is an emoticon. – andcoz Oct 10 '18 at 12:47
  • For another question with this print command, see unix.stackexchange.com/questions/474501 . – JdeBP Oct 10 '18 at 13:08
  • 2
    I'm noting that you currently have five open questions, none with any accepted answers. If you are happy with any particular answer, then you may accept it by clicking the greyed-out checkmark to the side of the answer. See also unix.stackexchange.com/help/someone-answers – Kusalananda Oct 10 '18 at 13:39
  • 1
    It would additionally be useful if your future questions (which are definitely welcomed) used the question's title field to specify the general topic of the question, while the body of the question gave the details. This helps both us and you in the end and also means we don't have to edit your questions so much to get them into the standard format. See also unix.meta.stackexchange.com/questions/5015 – Kusalananda Oct 10 '18 at 13:43

In the ksh93 shell, there is a print utility built into the shell. This utility understands a number of escape sequences. One of these is \c.

This is from the ksh93 manual in the section relating to the print utility:


Causes print to end without processing more arguments and not adding a new-line.

This is thus something that makes it output a string without adding a newline at the end of the output. The next piece of output that your script is generating would occur on the same line, directly after the text Running Tests (this might take a while):.

This works in a similar fashion in the zsh shell.

For future reference, it would be nice if you could specify what shell you are working with, especially when you are using nonstandard utilities like print that may work differently in different shells.

  • 1
    The Z shell has a print with a \c, for example. – JdeBP Oct 10 '18 at 13:26
  • @JdeBP The escape is documented for zsh's echo though, but it seems to do the same thing. – Kusalananda Oct 10 '18 at 13:28
  • 1
    echo, printf, print, and pushln are all implemented by a single bin_print() function in the Z shell, distinguishing amongst them where necessary by flags passed to the function. Processing of \c appears from a quick review to be common code. – JdeBP Oct 10 '18 at 13:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.