mirror of https://github.com/tLDP/LDP
updated
This commit is contained in:
parent
70a334a970
commit
0b5e3a56c8
|
@ -467,6 +467,18 @@ Loops for, while and until
|
||||||
example
|
example
|
||||||
<p>
|
<p>
|
||||||
</sect1>
|
</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 -->
|
<!-- while -->
|
||||||
<sect1>
|
<sect1>
|
||||||
While sample
|
While sample
|
||||||
|
@ -649,20 +661,21 @@ Misc
|
||||||
|
|
||||||
<sect1>
|
<sect1>
|
||||||
Finding bash
|
Finding bash
|
||||||
<P> From a message from mike (see Thanks to)
|
<P> From a message from mike (see Thanks to)
|
||||||
<P> you always use #!/bin/bash .. you might was to give an example of
|
<P> you always use #!/bin/bash .. you might was to give an example of
|
||||||
<P> how to find where bash is located.
|
<P> how to find where bash is located.
|
||||||
<P> 'locate bash' is preferred, but not all machines have locate.
|
<P> 'locate bash' is preferred, but not all machines have locate.
|
||||||
<P> 'find ./ -name bash' from the root dir will work, usually.
|
<P> 'find ./ -name bash' from the root dir will work, usually.
|
||||||
<P> Suggested locations to check:
|
<P> Suggested locations to check:
|
||||||
<P> ls -l /bin/bash
|
<P> ls -l /bin/bash
|
||||||
<P> ls -l /sbin/bash
|
<P> ls -l /sbin/bash
|
||||||
<P> ls -l /usr/local/bin/bash
|
<P> ls -l /usr/local/bin/bash
|
||||||
<P> ls -l /usr/bin/bash
|
<P> ls -l /usr/bin/bash
|
||||||
<P> ls -l /usr/sbin/bash
|
<P> ls -l /usr/sbin/bash
|
||||||
<P> ls -l /usr/local/sbin/bash
|
<P> ls -l /usr/local/sbin/bash
|
||||||
<P> (can't think of any other dirs offhand... i've found it in
|
<P> (can't think of any other dirs offhand... i've found it in
|
||||||
<P> most of these places before on different system).
|
<P> most of these places before on different system).
|
||||||
|
<P> You may try also 'wich bash'.
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<!-- Capturing a commands output -->
|
<!-- 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> Laurent Martelli for translating this document to French (soon here the URL)
|
||||||
<item> Felix Hudson for writing the <it/renna/ script
|
<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> Mike (pink) made some suggestions about locating bash and testing files
|
||||||
|
<item> fiesh make a nice suggestion for the loops section.
|
||||||
</itemize>
|
</itemize>
|
||||||
</sect1>
|
</sect1>
|
||||||
<sect1>
|
<sect1>
|
||||||
History
|
History
|
||||||
<p> Samples added on string comparison.
|
<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.7 More corrections and some old TO-DO sections written.
|
||||||
<p> v0.6 Minor corrections.
|
<p> v0.6 Minor corrections.
|
||||||
<p> v0.5 Added the redirection section.
|
<p> v0.5 Added the redirection section.
|
||||||
|
|
Loading…
Reference in New Issue