代码搜索:bash
找到约 5,321 项符合「bash」的源代码
代码结果 5,321
www.eeworm.com/read/442904/7642577
initscript
#!/bin/bash
# Source function library.
. /etc/init.d/functions
DRCOM_PATH=/usr/local/bin
RETVAL=0
start() {
echo -n $"Starting drcomd: "
$DRCOM_PATH/drcomd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] ||
www.eeworm.com/read/441865/7663629
initscript
#!/bin/bash
# Source function library.
. /etc/init.d/functions
DRCOM_PATH=/usr/local/bin
RETVAL=0
start() {
echo -n $"Starting drcomd: "
$DRCOM_PATH/drcomd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] ||
www.eeworm.com/read/438832/7725416
sh ex47.sh
#!/bin/bash
# printf 示例
PI=3.14159265358979
DecimalConstant=31373
Message1="Greetings,"
Message2="Earthling."
echo
printf "Pi to 2 decimal places = %1.2f" $PI
echo
printf "Pi to 9 decimal places =
www.eeworm.com/read/438832/7725855
sh userlist.sh
#!/bin/bash
# userlist.sh
PASSWORD_FILE=/etc/passwd
n=1 # User number
for name in $(awk 'BEGIN{FS=":"}{print $1}' < "$PASSWORD_FILE" )
# 域分隔 = : ^^^^^^
# 打印出第一个域
www.eeworm.com/read/438832/7725866
sh avoid-subshell.sh
#!/bin/bash
# avoid-subshell.sh
# 由Matthew Walker所提出的建议.
Lines=0
echo
cat myfile.txt | while read line; # (译者注: 管道会产生子shell)
do {
echo $line
www.eeworm.com/read/438832/7725890
sh getopt-simple.sh
#!/bin/bash
# getopt-simple.sh
# 作者: Chris Morgan
# 已经经过授权, 可以使用在本书中.
getopt_simple()
{
echo "getopt_simple()"
echo "Parameters are '$*'"
until [ -z "$1" ]
do
echo "Processing
www.eeworm.com/read/438019/7737563
gen
#!/bin/bash
echo Generating scoreboard.
./standings.pl
echo Generating team statistics.
./teams.pl
echo Generating individual statistics.
./indiv.pl
echo Generating round-by-round statistics.
./rou
www.eeworm.com/read/435688/7787765
stdin calculator.ksh.stdin
#!/bin/ksh
#
# Demonstration on how to use Glade and the GTK-server with BASH.
#
# Tested with GTK-server 2.3.1 on SLAMD12 and Kornshell93
# October 28, 2008 (c) Peter van Eerten - GPL license.
#
# Ad
www.eeworm.com/read/198733/7915201
gdbline
#!/bin/bash
#
# $Id: gdbline,v 1.1 2004/08/02 16:27:55 corbet Exp $
#
# gdbline module image
#
# Outputs an add-symbol-file line suitable for pasting into gdb to examine
# a loaded module.
#
cd /sys/m
www.eeworm.com/read/198531/7931042
build-dh
#!/bin/bash
#
# Build Diffie-Hellman parameters for the server side
# of an SSL/TLS connection.
#
if test $KEY_DIR; then
openssl dhparam -out ${KEY_DIR}/dh${KEY_SIZE}.pem ${KEY_SIZE}
else
ec