13.2.1 Bash – GNU standard interactive shell
References for Bash:
-
bash(1)
-
info bash
-
the LDP BASH Programming -
Introduction HOWTO
as starter information.
-
mc /usr/share/doc/bash/examples/ /usr/share/doc/bash/
(Install the bash-doc
package to see the example files.)
-
Learning the bash Shell, 2nd edition (O'Reilly)
Short program example (creates account entries for newusers
from
standard input):
#!/bin/bash
# (C) Osamu Aoki Sun Aug 26 16:53:55 UTC 2001 Public Domain
pid=1000;
while read n1 n2 n3 ; do
if [ ${n1:0:1} != "#" ]; then
let pid=$pid+1
echo ${n1}_${n2}:password:${pid}:${pid}:,,,/home/${n1}_${n2}:/bin/bash
fi
done