Documente Academic
Documente Profesional
Documente Cultură
Scripting 101
Rosalind Archer
April 17th, 2002
Disclaimer
• I am not a scripting “guru”. I find ways to
get scripts to work but I can guarantee
they are not the most efficient ways
possible!
Web Directory
• All files related to this presentation are
available at:
http://pumpjack.tamu.edu/~archer/UNIX/
Example Files
• All the files presented in the scripting
examples at the end of the presentation
are contained in a “zipped” file called
scripts.tar.
kill - 9 15059
File permissions
File Permissions
• There are 3 sets of file permssions on
any Unix file: read, write, execute access
for you, members of your “group” and the
rest of the world.
< ecl_input means that script takes input from this file
Example: Repeated Eclipse
Runs
Example: Changing Eclipse
Data Files
sed - stream editor
• Sed is a command line based text editor
that can be very useful as part of shell
scripts.
Columns 1 Columns 2
abc 123
abc 123
abc 123
abc
paste command
paste columns1 columns2 >
columns3
creates a file called columns3 with the
following entries:
a b c 1 2 3
a b c 1 2 3
a b c 1 2 3
a b c
cat command
• Cat joins files together one after another.