Home > Programming > Shell Programming
CSC209 Tutorial Unix & Shell Programming (1)
Sort Desciption:CSC209 Tutorial Unix & Shell Programming (1) TA: Guoli Li Agenda •Basic Unix Commands (with online demo) -Login & Logout -Basic file management -Use the man page -File structure ...
Content Inside:CSC209 Tutorial Unix & Shell Programming (1) TA: Guoli Li Agenda •Basic Unix Commands (with online demo) -Login & Logout -Basic file management -Use the man page -File structure & User account •Shell Programming (with online demo) -Shells on CDF -IO redirection -Pipes Login & Logout •Logging in -User name -Password •Logging out -Exit -Clear •Remote access -SSH : ssh userid@hostname -SFTP: sftp userid@hostname •ls and lls •put and get Basic Unix Commands •touch: change file timestamps •mkdir: make directories (-v) •rmdir: remove empty directories •cd: go to a directory •ls: list directory contents (-a -l) •cp: copy files and directories (-r) •mv: move (rename) files •rm: remove files or directories (-rf) Basic Unix Commands •cat: concatenate files and print on the standard output •wc: print the number of bytes, words, and lines in files (-l -w -c ) •chmod: change file access permissions (-R) (ugoa, +-=,rwx) •grep: print lines matching a pattern •man: online manual File Structure •cd: go to a directory •pwd: print name of current/working directory •pushd: adds a directory to the top of the directory stack •popd: removes entries from the directory stack. •who: show who is logged on •whoami: print effective userid Shell Programming •Shells on CDF /bin/*sh - sh bashcshtcsh dash ksh ash rbash rzsh tcsh zsh •Default Shell: echo $SHELL -tcsh on CDF •Change default shell -chsh -s /bin/bash username •I/O redirection -Prog < infile > outfile -Prog > & outfile &n ...
Source: www.cdf.toronto.edu
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Related Files
basic shell programming
Filed under: Programming and Shell Programmingbash derives much of its programming functionality from shell variables. Weve ... builtin variables that are vital to shell programming. ...
Unix Shell Scripts
Filed under: Programming and Shell Programmingthat file is called shell script language. Like other programming languages it has variables and flow control. statements (e.g. ifthenelse while for ...
UNIX Shell Programming
Filed under: Programming and Shell ProgrammingPage 1 of 1 ITC_UNIXsp ExecuTrain Course Outline UNIX Shell Programming IT0001 3 Days Description Students learn to read, write, and debug shell scripts, thus increasing ...
Automated testing using Shell Scripting
Filed under: Programming and Shell ProgrammingAdvanced Bash scripting guide from The Linux Documentation Project (TLDP). Unix Shell Programming by Yashavant Kanetkar BPB Publication. ...
Shell Programming
Filed under: Programming and Shell ProgrammingThis training in Shell Programming is designed for. administrator to create and debug shell scripts so as to. automate routine tasks. ...
