代码搜索:bash
找到约 5,321 项符合「bash」的源代码
代码结果 5,321
www.eeworm.com/read/458682/7291488
sh csubloop.sh
#!/bin/bash
# csubloop.sh: Setting a variable to the output of a loop.
variable1=`for i in 1 2 3 4 5
do
echo -n "$i" # The 'echo' command is critical
done`
www.eeworm.com/read/458682/7291491
sh script-array.sh
#!/bin/bash
# script-array.sh: Loads this script into an array.
# Inspired by an e-mail from Chris Martin (thanks!).
script_contents=( $(cat "$0") ) # Stores contents of this script ($0)
www.eeworm.com/read/458682/7291506
sh ex34.sh
#!/bin/bash
# script "set-test"
# Invoke this script with three command line parameters,
# for example, "./set-test one two three".
echo
echo "Positional parameters before set \`uname -a\` :"
echo
www.eeworm.com/read/458682/7291508
sh manview.sh
#!/bin/bash
# manview.sh: Formats the source of a man page for viewing.
# This script is useful when writing man page source.
# It lets you look at the intermediate results on the fly
#+ while work
www.eeworm.com/read/458682/7291641
sh hello.sh
#!/bin/bash
# hello.sh: Saying "hello" or "goodbye"
#+ depending on how script is invoked.
# Make a link in current working directory ($PWD) to this script:
# ln -s hello.sh goodbye
# Now
www.eeworm.com/read/458682/7291658
sh ex3.sh
#!/bin/bash
# This is a simple script that removes blank lines from a file.
# No argument checking.
#
# You might wish to add something like:
#
# E_NOARGS=65
# if [ -z "$1" ]
# then
# echo "Usage: `
www.eeworm.com/read/458682/7291684
sh ex44.sh
#!/bin/bash
# Killing ppp to force a log-off.
# Script should be run as root user.
killppp="eval kill -9 `ps ax | awk '/ppp/ { print $1 }'`"
# -------- process ID of ppp -------
www.eeworm.com/read/458682/7291698
sh findstring.sh
#!/bin/bash
# findstring.sh:
# Find a particular string in the binaries in a specified directory.
directory=/usr/bin/
fstring="Free Software Foundation" # See which files come from the FSF.
for fil
www.eeworm.com/read/458682/7291752
sh de-rpm.sh
#!/bin/bash
# de-rpm.sh: Unpack an 'rpm' archive
: ${1?"Usage: `basename $0` target-file"}
# Must specify 'rpm' archive name as an argument.
TEMPFILE=$$.cpio # Tempfile wit
www.eeworm.com/read/458682/7291759
sh reassign-stdout.sh
#!/bin/bash
# reassign-stdout.sh
LOGFILE=logfile.txt
exec 6>&1 # Link file descriptor #6 with stdout.
# Saves stdout.
exec > $LOGFILE # stdout replaced with file "