Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
# Hello World Program in Bash Shell
set +f
RELEASE_VERSION=1.4.0.76
touch vuciemmesse.ui.apps-${RELEASE_VERSION}.zip
rename -v ${RELEASE_VERSION} ${RELEASE_VERSION}-rc *.zip
ls -l
# Hello World Program in Bash Shell
echo "Hello World!"
RELEASE_VERSION=1.4.0.76
touch vuciemmesse.ui.apps-${RELEASE_VERSION}.zip
files=$(ls -1 vuciemmesse.ui.apps-${RELEASE_VERSION}.zip)
echo files: $files
for f in $files; do b=$(basename ${f}.zip); echo mv "$f" "$b-rc.zip";done
echo done
# Hello World Program in Bash Shell
perm() {
local items="$1"
local out="$2"
local i
[[ "$items" == "" ]] && echo "$out" && return
for (( i=0; i<${#items}; i++ )) ; do
perm "${items:0:i}${items:i+1}" "$out${items:i:1}"
done
}
test() {
local number="$1"
local iniitem="aabbcc"
perm "$iniitem"
echo "$iniitem"
}
test 3
caches=(a b c d e f g h i j k l m n o p q r s t u v w x y z)
mots=("java" "programme" "informatique" "bash" "code")
nombredeligne=8
ligne=0
# fonction qui permet de générer un mot au hasard
function motAuHasard () {
mot=$(($RANDOM % $1))
return $[mot]
}
# fonction qui cache les lettres par des tirés et affiche le mot
function afficheMot(){
for index in "${!caches[@]}";
do
sed -e "s/"${caches[$index]}"/-/g" $1 > $2
done
echo $2
}
motAuHasard $nombredeligne
echo $?
afficheMot "alami" t