Exemplo de script:
#!/bin/bash
# This is a simple demo script
# It takes 3 parameters and checks if they are files or directories
echo "Welcome to my script"
if [[ -f "" || -d "" ]]
then
echo "The First argument is a file or directory"
fi
if [[ -f "" || -d "" ]]
then
echo "The second argument is a file or directory"
fi
if [[ -f "" || -d "" ]]
then
echo "The third argument is a file or directory"
fi
echo "Bye!"
Cenário de exemplo
Eu salvei o script como ~/script.sh
e fiz chmod +x script.sh
karimov-danil@Karimov-Danil:~$ ./script.sh "Шаб лоны" "Обще доступные" "ta lk" Welcome to my script The First argument is a file or directory The second argument is a file or directory The third argument is a file or directory Bye!
Nota: você deve passar argumentos dentro de aspas duplas.