<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://192.168.180.206:8001/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://192.168.180.206:8001/feed.php">
        <title>wiki.niziak.spox.org - linux:bash</title>
        <description></description>
        <link>http://192.168.180.206:8001/</link>
        <image rdf:resource="http://192.168.180.206:8001/_media/wiki:dokuwiki.svg" />
       <dc:date>2026-05-12T23:30:39+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:arg?rev=1700719619&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:cond?rev=1772995852&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:error_handling?rev=1592301545&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:heredoc?rev=1776497414&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:password?rev=1764056429&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:re?rev=1778132296&amp;do=diff"/>
                <rdf:li rdf:resource="http://192.168.180.206:8001/linux:bash:source?rev=1777976188&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://192.168.180.206:8001/_media/wiki:dokuwiki.svg">
        <title>wiki.niziak.spox.org</title>
        <link>http://192.168.180.206:8001/</link>
        <url>http://192.168.180.206:8001/_media/wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:arg?rev=1700719619&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-11-23T06:06:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Bash: arguments</title>
        <link>http://192.168.180.206:8001/linux:bash:arg?rev=1700719619&amp;do=diff</link>
        <description>Bash: arguments

Access to parameters with variables $@ or $*.
Both expands to the positional parameters, starting from one.

	*  $@ When the expansion occurs within double quotes, each parameter expands to a separate word. That is, “$@” is equivalent to</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:cond?rev=1772995852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-08T18:50:52+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Conditionals</title>
        <link>http://192.168.180.206:8001/linux:bash:cond?rev=1772995852&amp;do=diff</link>
        <description>Conditionals

negate


if [[ $? -ne 0 ]]; then       
if ! [[ $? -eq 0 ]]; then    
if [[ ! $? -eq 0 ]]; then</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:error_handling?rev=1592301545&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-06-16T09:59:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>BASH: Error handling</title>
        <link>http://192.168.180.206:8001/linux:bash:error_handling?rev=1592301545&amp;do=diff</link>
        <description>BASH: Error handling

function exit on error

Construction similar to try-catch:


task() {
  ( 
    set -e
    set -o pipefail
    echo &quot;task() started&quot;
    do_command1 ${1} ${2} &amp;&amp; banner OK || banner ERROR
    do_command2 ${1} ${2} &amp;&amp; banner OK || banner ERROR
    build_cmd_step_1
  build_cmd_step_2
  build_cmd_step_3
  ...
)}

task param1 param2</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:heredoc?rev=1776497414&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-04-18T07:30:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>heredoc</title>
        <link>http://192.168.180.206:8001/linux:bash:heredoc?rev=1776497414&amp;do=diff</link>
        <description>heredoc

Suppress variable expansion

To do not handle $ in heredoc you need to quote (&#039; or &quot;) heredoc delimiter:


cat &gt; /opt/bin/startup.sh &lt;&lt; &quot;ENDSCRIPT&quot;
#!/bin/sh
export LD_LIBRARY_PATH=...:$LD_LIBRARY_PATH
source /opt/bin/env.sh
/opt/bin/hello
ENDSCRIPT</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:password?rev=1764056429&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-25T07:40:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>passwords handling</title>
        <link>http://192.168.180.206:8001/linux:bash:password?rev=1764056429&amp;do=diff</link>
        <description>passwords handling

&lt;https://www.linux-magazine.com/Online/Features/Bash-Tips-Passing-Passwords&gt;

Fundamentals of handling passwords securely in a shell</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:re?rev=1778132296&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-05-07T05:38:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Regular expressions</title>
        <link>http://192.168.180.206:8001/linux:bash:re?rev=1778132296&amp;do=diff</link>
        <description>Regular expressions

	*  Double square brackets
	*  regular expression without quotes


if [[ &quot;$string&quot; =~ [0-9]+ ]]; then
    echo MATCH
fi</description>
    </item>
    <item rdf:about="http://192.168.180.206:8001/linux:bash:source?rev=1777976188&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-05-05T10:16:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>source</title>
        <link>http://192.168.180.206:8001/linux:bash:source?rev=1777976188&amp;do=diff</link>
        <description>source

Possible test scenario:

	*  call from another directory by full path /home/user/bin/myscripth.sh
	*  add /home/user/bin to PATH and then call from another directory by myscript.sh
	*  create symlink to script and call using symlink. Check for relative and absolute symlinks.</description>
    </item>
</rdf:RDF>
