News Register Control Panel Private Messages Members List Team Search News Posts About Us
 

Useful shell functions
  Author: Ravish Ahuja
Added: 12/19/2002
Type: Tip
Viewed: 1288 time(s)
Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10Average visitor rating of 9.2/10
Shell Functions and Corresponding Command Line Symbols

Symbol => Function => Example

< => Take input from cmd from file => cmd < file
> => Send output of cmd to file => cmd > file
>> => Append output of cmd to file => cmd >> file
2> => Send standard error to file => cmd 2> file
2>> => Append standard error to file => cmd 2>> file
| => Run cmd1 and then send out put to cmd2 => cmd1 | cmd2
& => Run cmd in background => cmd &
; => Run cmd1 and then cmd2 => cmd1 ; cmd2
* => Filename wildcard - matches any character in file names => x*y
? => Filename wildcard - matches any single character in file names => x?y
[...] => Filename mathcing - matches any character in set => [Ff]ile
= => Assign value to shell variable => Home=/usr/name
\ => Turn of meaning of next special character => \newline
'...' => Prevent shell from interpreting text in quotes
"..." => Prevent shell from interpreting text in quotes except for $, ", , and single quotes


Article Pages:  1  




How would you rate this article:    Bad Good   Go � 


� Copyright Linux Advisory 2003. All rights reserved.
We are not responsible for the comment and story contributed by users.