$PSFILE psxy $REGION $PROJ $LINE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sd$SSIZE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sc$SSIZE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -St$SSIZE $BLACK aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fois-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sx$SSIZE $BLACK aki-fois-1.dat -O >> $PSFILE kghostview $PSFILE &"> $PSFILE psxy $REGION $PROJ $LINE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sd$SSIZE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sc$SSIZE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -St$SSIZE $BLACK aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fois-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sx$SSIZE $BLACK aki-fois-1.dat -O >> $PSFILE kghostview $PSFILE &">
Download presentation
Presentation is loading. Please wait.
Published byLeona Kelly Modified over 8 years ago
1
UNIX Portable (common to many computer architectures), multitasking, multi-user operating system Introduced by Bell labs in mid-1960’s Thus, much longer history of serious computing than Windows or Apple OS (Apple OS is practically UNIX) Stable, secure, high performance Practically never needs rebooting Implementations on PC are called Linux Linux is only the kernel, and numerous packages with graphical interfaces are available See http://www.linux.com/directory/Distributionshttp://www.linux.com/directory/Distributions All distributions come with hundreds of free programs Note LibreOffice, Octave We use Red Hat Enterprise (this one is not free, but there exists a free equivalent) – good for development, parallel computing I use Fedora at home (“Cinnamon” is a simple and nice-looking desktop) Many people love Ubuntu (user- and media-oriented)
2
UNIX shell Seismic Un*x and GMT rely on the ability of the shell to combine many programs for achieving a common task Every processing flow in Seismic Un*x and every image in GMT should be described by a shell script Example of a C shell script doing GMT plotting: #!/bin/csh ########### GMT script to redraw "Aki" plot ###################################################### set PSFILE = PS/aki-1.ps # set REGION = -R55/30/180/65r set REGION = -R0.0/-0.1/25/0.35r set PROJ = "-JX4/3 -P -V" set BLACK =-G0/0/0 set WHITE =-G255/255/255 set GRAY =-G200/200/200 set RED =-G225/0/0 set RUBY =-G225/0/100 set GREEN =-G0/125/0
3
UNIX shell example (cont) set SSIZE = 0.07 set SLINE = -W1.2 set LINE = -W0.7 gmtset BASEMAP_TYPE PLAIN DEGREE_FORMAT 1 GRID_CROSS_SIZE 0 GRID_PEN 0.5\ ANOT_FONT_SIZE 12 LABEL_FONT_SIZE 12 ## plot: psbasemap $REGION $PROJ -Bf1a5:"Frequency (Hz)":/f0.01a0.05:"100/Q":WS -K > $PSFILE psxy $REGION $PROJ $LINE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sd$SSIZE aki-fpac-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sc$SSIZE aki-fotl-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -St$SSIZE $BLACK aki-ftsk-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $LINE aki-fois-1.dat -O -K >> $PSFILE psxy $REGION $PROJ $SLINE -Sx$SSIZE $BLACK aki-fois-1.dat -O >> $PSFILE kghostview $PSFILE &
4
UNIX pipelines and redirection suread | sufilter | suplot # this prints two files on screen: cat file1 file2 # this prints two files into another file3: cat file1 file2 > file3 # this writes into file2 from multiple files file1*.txt # the lines containing both tokens AAAA and BBBB: grep AAAA file1*.txt | grep BBBB > file2
5
Basic commands. # current directory.. # directory one level above ~# HOME directory *, ?, or [a,b,..] # wild cards (filename patterns) man, info# manuals about any programs sh, csh, tcsh# “shell” programs (user dialog) env# displays user environment source# executes shell commands from a file pwd, ls# display directories cd# change working directory more, less, tail# display file contents grep# search file contents for text tokens wc # counts lines, words, and characters awk, se# filters for file (stream) contents cp, rm, mv# copy, remove, rename or move files rmdir# remove (empty) directory gcc, g++, g77, gfortran # compilers make# for compiling code or maintaining documents
6
User environment Collection of strings “NAME = VALUE” describing the specific user settings usually created upon login or entering a shell (opening a terminal window) modified and utilized in shell scripts
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.