Timeline for how to pass argument as string outside which should execute particular function
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 31, 2019 at 16:38 | comment | added | FelixJN |
@Tom15 Total number of arguments is given as ${#}, so check if this is 2 after shifting. (else abort). If you want specifically two fixed files, check if ${1} and ${2} are the correct strings.
|
|
| Oct 31, 2019 at 16:33 | comment | added | Tom15 | I tried append your script, but this even work for -> ./script.sh arg1 create or ./script.sh create . my need is - should only work when passing arg1 arg2 create else throw error . where arg1 and arg2 is constant when passing create. | |
| Oct 31, 2019 at 16:28 | vote | accept | Tom15 | ||
| Oct 31, 2019 at 17:24 | |||||
| Oct 30, 2019 at 9:52 | history | edited | FelixJN | CC BY-SA 4.0 |
deleted 3 characters in body
|
| Oct 30, 2019 at 9:45 | history | answered | FelixJN | CC BY-SA 4.0 |