Timeline for How to check for the first element in an Array
Current License: CC BY-SA 3.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 10, 2015 at 15:55 | answer | added | glenn jackman | timeline score: 0 | |
| Dec 10, 2015 at 15:51 | vote | accept | IGGt | ||
| Dec 10, 2015 at 15:19 | answer | added | terdon♦ | timeline score: 3 | |
| Dec 10, 2015 at 14:40 | answer | added | IGGt | timeline score: 0 | |
| Dec 10, 2015 at 14:36 | comment | added | IGGt |
maybe it's me, but getopts looks overly complex for my needs, Plus I couldn't get it to work, but cheers anyway
|
|
| Dec 10, 2015 at 14:26 | comment | added | IGGt |
cheers Dani_I, but if I have ItemName -a -b -I or AnotherItem -a -b then ItemI will be wrong. Is there simply a way of saying if this is the first item in an Array do this else do that?
|
|
| Dec 10, 2015 at 12:48 | history | edited | terdon♦ |
edited tags
|
|
| Dec 10, 2015 at 12:48 | comment | added | PM 2Ring | This looks like a job for getopts. Also see the Small getopts tutorial. | |
| Dec 10, 2015 at 12:25 | comment | added | Dani_l | Isn't itemI ItemName? just save x for itemI and return x instead of 0/1 for itemI if that's what you want. | |
| Dec 10, 2015 at 12:05 | history | asked | IGGt | CC BY-SA 3.0 |