Now I try to create an alias for this command:alias cdport    'cd `whereis \!^ | awk \'{print $2}\'`'Can't find any good examples of using more than 2 commands in a sequence.How to fix that code? Thanks.
tcsh alias for cd through path of a port after searching
freebsd;alias;tcsh
You can't escape quotes in strings in csh. You need to switch to double-quoted strings to enter those characters:alias cdport 'cd `whereis \!^ | awk '''{sub(/[^/]*$, /, $2); print $2}'''`'I've also fixed the awk script to remove the filename from the output of whereis, so you just get the directory part.