From the course: Linux Tips
Exploring csh and tcsh - Linux Tutorial
From the course: Linux Tips
Exploring csh and tcsh
- [Instructor] C shell is a command line shell that's widely available on Linux systems and can be found on other platforms as well. And C Shell has a long history. And being one of the earliest command shells for Unix, it pioneered many of the features we take for granted in interactive shells today. Development of the shell was continued in TC shell, short for TENEX C Shell, which is a modified and updated version of the original C Shell command processor. Many of the features we are used to having in modern shells started out as features of C Shell. Things like tilde expansion for the home directory, wildcards, redirection, pipes, and substitution. C Shell also has a scripting language which is similar in style to C rather than the scripting style that was introduced in the Born shell. Though while some people prefer writing scripts in a C-like way, these scripts aren't as portable to other shells, and the scripting style of Born shell became the more recommended way of writing scripts that may need to run on other shells. But aside from scripting, if you're used to a shell-like bash, switching over to give the C Shell a try isn't too difficult. To launch the shell, I can write tcsh in whatever shell I'm currently using. And if it's not installed, you can install it with your package manager. Okay, let's try that again. All right, tcsh. And here we are. By default the prompt shows the system name, a colon, the present working directory, and a greater than sign. While C Shell is similar in many ways to other shells, it does have some limitations that you should be aware of. We can redirect or pipe standard out to a file and also redirect or pipe both standard out and standard error to a file, but in C Shell and TC Shell we can't separately send only standard errors somewhere as we can in Bash and some other shells. C Shell also doesn't support brace expansion, which is present in shells like Bash and Z Shell. TCShell adds a history feature where you can use the up and down arrows to search through a list of previous commands. While most modern shells offer command completion using the tab key, TC Shell also offers this feature using the escape key. TC Shell also offers a few other features that aren't commonly found in other shells like the ability to recall specific ranges of arguments from previous commands and the ability to use argument selectors within aliases. If someone is proficient in bash or Z-shell, it's not terribly clear to me why they might choose to switch to using TC Shell, but people have preferences. And if you like TC Shell, you should use it. Many people who started out using C Shell on various Unix variants are accustomed to it and continue to use TC Shell on modern systems. And if you're curious to try new things, take some time to explore using TC Shell, especially if you have a background in C or a C-like language. It can also be helpful to know about in case you come across an older system that doesn't have Bash installed or a system that has been configured with C Shell, like Free BSD.
Contents
-
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Exploring Windows Subsystem for Linux2m 20s
-
(Locked)
Windows Subsystem for Linux7m 20s
-
(Locked)
Exploring virtualization5m 28s
-
(Locked)
Exploring containers5m 19s
-
(Locked)
Exploring Fedora3m 8s
-
(Locked)
Ubuntu desktop 18.042m
-
(Locked)
Changing the default shell3m 30s
-
(Locked)
Exploring other shells2m 5s
-
(Locked)
Blocking ads on your network with Pi-hole6m 35s
-
(Locked)
Exploring CentOS2m 6s
-
(Locked)
Exploring Zsh5m 41s
-
(Locked)
Osquery4m 28s
-
(Locked)
Exploring fish5m 21s
-
Exploring csh and tcsh2m 34s
-
(Locked)
Using diff to compare files3m 54s
-
(Locked)
Using xargs3m 41s
-
(Locked)
Configuring and managing logs4m 32s
-
(Locked)
Job control3m 59s
-
(Locked)
Using watch and time3m 5s
-
(Locked)
Recording a terminal session3m 14s
-
(Locked)
Exploring Debian1m 49s
-
(Locked)
Exploring SUSE Linux7m 33s
-
(Locked)
Exploring Arch Linux16m 44s
-
(Locked)
Exploring Alpine Linux6m 18s
-
(Locked)
Exploring Linux Mint5m 14s
-
(Locked)
Exploring Amazon Linux5m 8s
-
(Locked)
UNIX time and the 2038 problem6m 36s
-
(Locked)
Visual file management with Midnight Commander5m 42s
-
(Locked)
Terminal on the go5m 1s
-
(Locked)
FUSE and SSHFS3m 54s
-
(Locked)
Removing Linux4m 44s
-
(Locked)
WSL distros on Windows 103m 13s
-
(Locked)
Embedded Linux4m 25s
-
(Locked)
Exploring Netboot2m 43s
-
(Locked)
Exploring ZFS3m 53s
-
(Locked)
Docker on Linux5m 24s
-
(Locked)
-
-