diff --git a/linux_intermediate/_build/latex/IntermediateLinuxCourse.pdf b/linux_intermediate/_build/latex/IntermediateLinuxCourse.pdf index 81920a0d2ff2a674a1310776906d56f41cbd01c5..be202f9be891f7fd33dc26f2ba9bfdf349541fe5 100644 Binary files a/linux_intermediate/_build/latex/IntermediateLinuxCourse.pdf and b/linux_intermediate/_build/latex/IntermediateLinuxCourse.pdf differ diff --git a/linux_intermediate/basic_scripting.rst b/linux_intermediate/basic_scripting.rst index 924c6a10d50c5ac35c3b1e8c64c09225ee36e21e..d0fc5202e9fb8a99ffcb8a1c6a07fc6eb8ab4060 100644 --- a/linux_intermediate/basic_scripting.rst +++ b/linux_intermediate/basic_scripting.rst @@ -202,11 +202,12 @@ You can mix multiple ``&&`` and ``||`` controls into a single line. /home/fthommen/a $ - Example: Count the heterogens described in a gzipped PDB file or, if it doesn't exist, - download the file:: - - $ gzip -c 4ZZN.pdb.gz && sed -n '/^HET /p' || wget "http://www.rcsb.org/pdb/files/4ZZN.pdb.gz" - $ +.. not working: +.. Example: Count the heterogens described in a gzipped PDB file or, if it doesn't exist, +.. download the file:: +.. +.. $ { gunzip -c 4ZZN.pdb.gz | sed -n '/^HET /p' } || wget "http://www.rcsb.org/pdb/files/4ZZN.pdb.gz" +.. $ *( cmds )* -- Group commands to create one single output stream: The commands are run in a subshell (i.e. a new shell is opened to run them): @@ -366,7 +367,7 @@ B) Evaluating of conditions or comparisons: - Examples: Test for the existence of /etc/passwd:: + Examples: Test for the existence of the directory `sequence_files`:: if [ -e ./sequence_files ] then @@ -639,7 +640,7 @@ $@: .. image:: _static/arguments.png -If you run the script :: +If you run the following script :: #!/bin/sh echo The script is $0 @@ -785,9 +786,9 @@ becomes: :: -q clngnew \ -M 150000 \ -R "select[(mem > 15000)]" \ - /g/software/bin/pymol-1.4 -r -p < pymol.pml + /g/software/bin/pymol -c -r pymol.pml -Which is way better to read and to maintain +Which is way better to read and to maintain... Script Debugging ----------------