Questions tagged [csh]

csh, or the C shell, is a command interpreter with a syntax reminiscent of the C programming language.

Quoted from the Solaris csh man page:

csh, the C shell, is a command interpreter with a syntax reminiscent of the C language. It provides a number of convenient features for interactive use that are not available with the Bourne shell, including filename completion, command aliasing, history substitution, job control, and a number of built-in commands. As with the Bourne shell, the C shell provides variable, command and filename substitution.

csh first appeared in 2BSD, and was originally created by Bill Joy. While Bourne shells are more popular, csh-style shells are still fairly popular especially in the BSD community & academia.

is an an enhanced version of csh, almost all versions of csh encountered nowadays are actually tcsh.

Programming in csh is a controversial topic. For one viewpoint, see this article.

1173 questions
-4
votes
1 answer

How do I remove all lines starting from the beginning until I reach a certain pattern, except from the last one

Example: >"one" >"two" >"three" >"title" >12 23 14 >... I want to remove all lines at the beginning until I reach the one in which NF==3 (awk), but the line named "title", and just once at the beginning of the file, not repeatedly. Thank…
-4
votes
2 answers

What is a perl one liner to replace a substring in a string?

Suppose you've got this C shell script: setenv MYVAR "-l os="\""redhat4.*"\"" -p -100" setenv MYVAR `perl -pe ""` Replace with code that will either replace "-p -100" with "-p -200" in MYVAR or add it if it doesn't exist, using a one liner…
dromodel
  • 9,581
  • 12
  • 47
  • 65
-6
votes
2 answers

What are ` in bash scripts?

I need help understanding a bash script. This bash script auto generates cron job lines from text files found in a specific folder…
prince
  • 671
  • 2
  • 11
  • 26
1 2 3
78
79