代码搜索:bash
找到约 5,321 项符合「bash」的源代码
代码结果 5,321
www.eeworm.com/read/458682/7291440
sh realname.sh
#!/bin/bash
# realname.sh
#
# From username, gets "real name" from /etc/passwd.
ARGCOUNT=1 # Expect one arg.
E_WRONGARGS=65
file=/etc/passwd
pattern=$1
if [ $# -ne "$ARGCOUNT" ]
then
echo
www.eeworm.com/read/458682/7291471
sh embedded-arrays.sh
#!/bin/bash
# embedded-arrays.sh
# Embedded arrays and indirect references.
# This script by Dennis Leeuw.
# Used with permission.
# Modified by document author.
ARRAY1=(
VAR1_1=value11
www.eeworm.com/read/458682/7291485
sh stack.sh
#!/bin/bash
# stack.sh: push-down stack simulation
# Similar to the CPU stack, a push-down stack stores data items
#+ sequentially, but releases them in reverse order, last-in first-out.
BP=100
www.eeworm.com/read/458682/7291652
sh ex11.sh
#!/bin/bash
echo
if test -z "$1"
then
echo "No command-line arguments."
else
echo "First command-line argument is $1."
fi
echo
if /usr/bin/test -z "$1" # Equivalent to "test" builtin.
#
www.eeworm.com/read/458682/7291660
sh colm.sh
#!/bin/bash
# This is a slight modification of the example file in the "column" man page.
(printf "PERMISSIONS LINKS OWNER GROUP SIZE MONTH DAY HH:MM PROG-NAME\n" \
; ls -l | sed 1d) | column -t
#
www.eeworm.com/read/458682/7291669
sh nightly-backup.sh
#!/bin/bash
# nightly-backup.sh
# http://www.richardneill.org/source.php#nightly-backup-rsync
# Copyright (c) 2005 Richard Neill <backup@richardneill.org>.
# This is Free Software licensed under
www.eeworm.com/read/458682/7291672
sh array-ops.sh
#!/bin/bash
# array-ops.sh: More fun with arrays.
array=( zero one two three four five )
# Element 0 1 2 3 4 5
echo ${array[0]} # zero
echo ${array:0} # zero
www.eeworm.com/read/458682/7291701
sh for-loopc.sh
#!/bin/bash
# Two ways to count up to 10.
echo
# Standard syntax.
for a in 1 2 3 4 5 6 7 8 9 10
do
echo -n "$a "
done
echo; echo
# +==========================================+
# Now, let's do
www.eeworm.com/read/458682/7291741
sh ex35.sh
#!/bin/bash
a=/home/bozo/daily-journal.txt
echo "Basename of /home/bozo/daily-journal.txt = `basename $a`"
echo "Dirname of /home/bozo/daily-journal.txt = `dirname $a`"
echo
echo "My own home is `ba
www.eeworm.com/read/458682/7291745
sh ex24.sh
#!/bin/bash
# Faxing (must have 'efax' package installed).
EXPECTED_ARGS=2
E_BADARGS=65
MODEM_PORT="/dev/ttyS2" # May be different on your machine.
# ^^^^^ PCMCIA modem card def