Create a function that takes either 1, 2, 3 or 0 as arguments. If the argument is 0 then the script should end with the exit command. In other cases, the function should print the respective number and shift arguments with the same amount using the shift command.
Case statement and argument parsing
Remover
Report a typo
Sample Input 1:
Sample Output 1:
1
2
2
2
1
2
1
1
3
1
2
1
1
2Write a program in Shell
#!/usr/bin/env bash
function skipper() {
# put your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.