-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Mardorf wrote:
> Hi Gustin :)
> 
> thank you too.
> 
> Gustin Johnson wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Ralf Mardorf wrote:
>>  
>>> Hi :)
>>>
>>> some users on that list seems to be fine with writing shell scripts. I'm
>>> still not fine with it and endeavour to avoid non-POSIX style while
>>> learning how to write those scripts.
>>>
>>>     
>> You may wish to have a look at the following:
>>
>> http://tldp.org/LDP/Bash-Beginners-Guide/html/
>>   
> 
> The problem with all those online guides is e.g. this:
> 
> http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_10_02.html
> 
> Array variables are fine for e.g. c like shells and even for pseudo
> Bourne shells, e.g. on Suse or Debian, but not for real POSIX, e.g.
> /bin/sh on Ubuntu, anyway I'll take a look at those guides too.

That is a good point.  I work with OpenWRT a lot (not just on Linksys
routers, but on x86 SBCs that we use a lot with our customers).  Out of
the box OpenWRT does not have bash so we have to be mindful of the
differences.  Arrays are so very nice to have, but Bash may not always
be available.  There are a number of these features with Bash that are
specific to Bash.

Having said that, the vast majority of my scripts are run on Linux or on
Windows via Cygwin, so I make use of those handy features when I can.
For any scripts for a full Linux distribution, I can count on Bash being
there (in fact on every modern distro that I have seen, /bin/sh is
usually just a symlink to /bin/bash).
> 
>> and
>> http://tldp.org/LDP/abs/html/
>>   
> 
> Seems to be a good overview, if I e.g. like to know all internal
> variables and other stuff.

It is a seriously handy guide.  I had it printed at a printshop here and
bound with a coil so that it lays flat on a desk. I don't refer to it as
much as before, but it is still very handy to have around.

>>> Hints how to use "grep" are welcome, e.g. if a PID has got 5 instead of
>>> 4 numbers, the script will display absurd messages.
>>>
This is a very handy search:

http://www.google.ca/search?q=regular+expression+tutorial

>> su <username> commands.
>>   
> 
> spinymouse-s...@64studio:~$ sudo -i
> r...@64studio:~# su spinymouse-sudo firefox www.google.de
> 
> Yes, it works :).
> 
Glad it worked.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK1CjOwRXgH3rKGfMRAidAAKCM27GjhhSN4mNmzJIQWKrxiIMcNQCcDkqo
3NH3fbVK3OIwMUnyBM+HjPQ=
=PL4j
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to