This commit is contained in:
gferg 2000-06-23 20:17:41 +00:00
parent 70a334a970
commit 0b5e3a56c8
1 changed files with 30 additions and 16 deletions

View File

@ -467,6 +467,18 @@ Loops for, while and until
example
<p>
</sect1>
<sect1>
C-like for
<P> fiesh suggested adding this form of looping. It's a for loop
more similar to C/perl... for.
<tscreen><verb>
#!/bin/bash
for i in `seq 1 10`;
do
echo $i
done
</verb></tscreen>
</sect1>
<!-- while -->
<sect1>
While sample
@ -649,20 +661,21 @@ Misc
<sect1>
Finding bash
<P> From a message from mike (see Thanks to)
<P> you always use #!/bin/bash .. you might was to give an example of
<P> how to find where bash is located.
<P> 'locate bash' is preferred, but not all machines have locate.
<P> 'find ./ -name bash' from the root dir will work, usually.
<P> Suggested locations to check:
<P> ls -l /bin/bash
<P> ls -l /sbin/bash
<P> ls -l /usr/local/bin/bash
<P> ls -l /usr/bin/bash
<P> ls -l /usr/sbin/bash
<P> ls -l /usr/local/sbin/bash
<P> (can't think of any other dirs offhand... i've found it in
<P> most of these places before on different system).
<P> From a message from mike (see Thanks to)
<P> you always use #!/bin/bash .. you might was to give an example of
<P> how to find where bash is located.
<P> 'locate bash' is preferred, but not all machines have locate.
<P> 'find ./ -name bash' from the root dir will work, usually.
<P> Suggested locations to check:
<P> ls -l /bin/bash
<P> ls -l /sbin/bash
<P> ls -l /usr/local/bin/bash
<P> ls -l /usr/bin/bash
<P> ls -l /usr/sbin/bash
<P> ls -l /usr/local/sbin/bash
<P> (can't think of any other dirs offhand... i've found it in
<P> most of these places before on different system).
<P> You may try also 'wich bash'.
</sect1>
<!-- Capturing a commands output -->
@ -968,14 +981,15 @@ About the document
<item> Laurent Martelli for translating this document to French (soon here the URL)
<item> Felix Hudson for writing the <it/renna/ script
<item> Kees van der Broek (for sending many corrections)
<item> Kees van den Broek (for sending many corrections)
<item> Mike (pink) made some suggestions about locating bash and testing files
<item> fiesh make a nice suggestion for the loops section.
</itemize>
</sect1>
<sect1>
History
<p> Samples added on string comparison.
<p> v0.8 More little additions.
<p> v0.7 More corrections and some old TO-DO sections written.
<p> v0.6 Minor corrections.
<p> v0.5 Added the redirection section.