|
Make Unix/Linux System Administration Easier With Fish
By Alex Trent
Expert Author
Article Date: 2010-05-13
Everyday, System Administrators on Unix/Linux based systems work with the console to accomplish the tasks at hand. The underlying system interpreting their commands to the system is a shell, usually bash, or tcsh, or even ksh or zsh for the very passionate shell user. I just found out about a new shell that is better than all of them.
I know what you're thinking, "Oh no here we go again, another shell zealot has found his match," but I promise this one is worth trying today just to see how truly amazing it is in its simplicity and power.
Why fish? Because "fish" stands for the "friendly interactive shell." Names can be deceiving, and fish, is much more than just a friendly shell. Take a look at some screen shots here. Thats right, you can pass input to fish with $argv instead of the cryptic $* and $2. Instead of $# you can just use count $argv. In place of $$ for the shell's current process id you can use %self. If you want to collect a process exit status just use $status instead of $?. By using fish, your shell scripts will actually look like code instead of a perl obfuscation contest.
Fish has a long list of features, a few are: X clipboard integration, syntax highlighting, tab completion for just about any command and descriptions for different completion options, a powerful help system, and an open function to open all files of a certain type in a directory with the default program.
Fish also has improved syntax over other shells. Here are a few code examples:
Posix style syntax Fish style syntax
if true; then echo hello; fi if true; echo hello; end
for i in a b c; do echo $i; done for i in a b c; echo $i; end
case $you in *) echo hi;; esac switch $you; case ‘*'; echo hi; end
hi () { echo hello; } function hi; echo hello; end
This article only covers a small subset of fish features, some of the information in this article comes from arstechnica.com.
Go there to read the full in depth article written by the creator of fish, Ryan Paul.
Download and try fish today!
About the Author: Alex Trent is a staff writer for WebProNews
|
|