You can use the printf
command (which is not specific to csh or tcsh). To print a formfeed character (ctl-L):
printf '\xc'
To demonstrate:
% printf '\xc' | od -c
0000000 \f
0000001
But are you sure formfeed is the character you want? It typically has no effect in a VT-100 compatible terminal emulator.
You can print arbitrary control character sequences, as defined by termcap, with tcsh's built-in echotc
command. man tcsh
and search for echotc
for details; man 5 termcap
to see the 2-character codes recognized by echotc
.
More portably (to shells other than csh and tcsh), the tput
command, part of the ncurses
package, is similar to echotc
, but it uses terminfo capability names rather than termcap (though it also supports termcap if support is compiled into the package).