Timeline for Getting the last argument passed to a shell script
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 6, 2022 at 15:51 | history | edited | EndlosSchleife | CC BY-SA 4.0 |
Simplified according to comment
|
Dec 25, 2021 at 10:59 | comment | added | F. Hauri - Give Up GitHub |
use of $(( )) is useless! "${@: 1 : $# - 1 }" will work same!
|
|
Jun 6, 2020 at 7:06 | history | edited | oguz ismail | CC BY-SA 4.0 |
added 28 characters in body
|
Dec 11, 2019 at 12:23 | comment | added | EndlosSchleife |
I already did by adding the parentheses, for example echo "${heads[-1]}" prints the last element in heads . Or am I missing something?
|
|
Dec 9, 2019 at 15:39 | comment | added | Stephane | How would you convert the heads into an array ? | |
Oct 22, 2014 at 11:14 | history | answered | EndlosSchleife | CC BY-SA 3.0 |