UI CS 270 - Aliases (24 pages)

Previewing pages 1, 2, 23, 24 of 24 page document View the full content.
View Full Document

Aliases



Previewing pages 1, 2, 23, 24 of actual document.

View the full content.
View Full Document
View Full Document

Aliases

88 views

Lecture Notes


Pages:
24
School:
University of Idaho
Course:
Cs 270 - System Software

Unformatted text preview:

Aliases Shell Command alias p word string If you alias a new command word equal to string then when you type the command word the string will be used in its place alias prints out all aliases defined put your aliases in your bashrc file why e g alias dir ls al unalias 1 History Shell Command history c n Print out the shell s current command history If a numeric value n is specified show only the last n entries in the history list If c is used clear the history list 2 Command Re execution 3 History Substitution string1 string2 Substitute string2 for string1 in the previous command and executes it lp financial report july 2003 txt lp File not found 2003 2004 lp financial report july 2004 txt request id is lwcs 37 1 file 4 Auto Completion Bash can complete a filename command name username or shell variable name To have Bash attempt to complete the current argument of your command type the TAB character 5 Tilde Substitution 6 Command substitution command echo there are who wc l users on the system there are 6 users on the system 7 Arithmetic Addition subtraction Increment decrement Multiplication division remainder Exponentiation Shell command declare i name This form of declare defines the variable name as an integer value 8 Conditional Expressions Arithmetic conditional operators Less than or equal to greater than or equal to less than greater than comparisons Equal not equal Logical NOT Logical AND Logical OR 9 Conditional Expressions cat divisors sh bin bash declare i testval 20 declare i count 2 start at 2 1 always works while count testval do result testval count if result 0 then evenly divisible echo testval is evenly divisible by count fi count done bash 20 is 20 is 20 is 20 is 20 is 10 divisors sh evenly divisible evenly divisible evenly divisible evenly divisible evenly divisible by by by by by 2 4 5 10 20 String Comparisons String conditional operators n string True if length of string is non zero z string True if length of string is zero string1 string2 True



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Aliases and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Aliases and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?