cnt=1 for i in “$*” do echo “Number of $cnt parameter is: $i” (( cnt++ )) done
echo echo
cnt=1 for i in “$@” do echo “Number of $cnt parametre is: $i” (( cnt++ )) done ####################################### Number of 1 parameter is: Hello, how are you?%Second%Third%Fourth
Number of 1 parameter is: Hello, how are you? Number of 2 parameter is: Second Number of 3 parameter is: Third Number of 4 parameter is: Fourth
# test_2.sh
#!/bin/bash
echo “Current process ID is: $$”
sleep 100 & echo “The most recent process ID is: $!” echo “The most recent process exit status is: $?” ################################## Current process ID is: 15599 The most recent process ID is: 15600 The most recent process ID exit status is: 0
# test_3.sh
#!/bin/bash echo “Current absolute file path name is: $_” echo “$-“ echo “Second $_”
let cnt=1 echo “Third $_” echo “$cnt” echo “Fourth $_” ################################## Current absolute file path name is: ./test_3.sh hB Second hB Third cnt=1 1 Fourth 1