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.
Tutorialspoint

arg foo 0.01

# Hello World Program in Bash Shell
demo1(){
    echo "\$1: ${1}, \$2: ${2}"
}
demo2(){
  echo $1 | sed "s/.*\?s\([0-9]\+\)e\([0-9]\+\).*/S\1E\2.$2/i"
}
demo3(){
  input=$1
  ext=$2
  pattern=".*\?s\([0-9]\+\)e\([0-9]\+\).*"
  echo $input | sed "s/${pattern}/S\1E\2.${ext}/i"
}



if [ -z "$1" ]; then
  bash -f $0 irgendetwasblabla-S01E01-blabla.srt mp4
  exit 0
fi
echo "\$1: ${1}, \$2: ${2}"
demo1 "bar" "foo"
demo2 $1 $2
demo3 $1 $2
echo "\$1: ${1}, \$2: ${2}"

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.