代码搜索:bash

找到约 5,321 项符合「bash」的源代码

代码结果 5,321
www.eeworm.com/read/339483/12230483

sh ex22a.sh

#!/bin/bash # Planets revisited. # Associate the name of each planet with its distance from the sun. for planet in "Mercury 36" "Venus 67" "Earth 93" "Mars 142" "Jupiter 483" do set -- $planet #
www.eeworm.com/read/339483/12230485

sh ex66.sh

#!/bin/bash area[11]=23 area[13]=37 area[51]=UFOs # Array members need not be consecutive or contiguous. # Some members of the array can be left uninitialized. # Gaps in the array are okay. #
www.eeworm.com/read/339483/12230543

sh ex52.sh

#!/bin/bash # Uudecodes all uuencoded files in current working directory. lines=35 # Allow 35 lines for the header (very generous). for File in * # Test all the files in $PWD. do search1=
www.eeworm.com/read/339483/12230563

sh recurse.sh

#!/bin/bash # recurse.sh # Can a script recursively call itself? # Yes, but is this of any practical use? # (See the following.) RANGE=10 MAXVAL=9 i=$RANDOM let "i %= $RANGE" # Generate a rando
www.eeworm.com/read/339483/12230593

sh read-r.sh

#!/bin/bash echo echo "Enter a string terminated by a \\, then press <ENTER>." echo "Then, enter a second string, and again press <ENTER>." read var1 # The "\" suppresses the newline
www.eeworm.com/read/339483/12230620

sh ex59.sh

#!/bin/bash JUST_A_SECOND=1 funky () { # This is about as simple as functions get. echo "This is a funky function." echo "Now exiting funky function." } # Function declaration must precede call.
www.eeworm.com/read/339483/12230625

sh ref-params.sh

#!/bin/bash # ref-params.sh: Dereferencing a parameter passed to a function. # (Complex Example) ITERATIONS=3 # How many times to get input. icount=1 my_read () { # Called with my
www.eeworm.com/read/339483/12230627

sh ex28.sh

#!/bin/bash LIMIT=19 # Upper limit echo echo "Printing Numbers 1 through 20 (but not 3 and 11)." a=0 while [ $a -le "$LIMIT" ] do a=$(($a+1)) if [ "$a" -eq 3 ] || [ "$a" -eq 11 ] # Excludes 3
www.eeworm.com/read/339483/12230680

sh dereference.sh

#!/bin/bash # dereference.sh # Dereferencing parameter passed to a function. # Script by Bruce W. Clare. dereference () { y=\$"$1" # Name of variable. echo $y # $Junk x=`eval "ex
www.eeworm.com/read/339483/12230803

sh letter-count.sh

#!/bin/bash # letter-count.sh: Counting letter occurrences in a text file. # Written by Stefano Palmeri. # Used in ABS Guide with permission. # Slightly modified by document author. MINARGS=2