Timeline for Bash - how to set variable within an if [] condition and use outside
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 18, 2021 at 15:40 | comment | added | Andrew Newby |
Ahhh man that was it! So the problem turned out to be I was doing: fi & sleep 5; instead of fi , and then sleep 5 on another line! (that was some code I found online that seemed to work - I didn't realise it would cause complications later! Thanks for the explanation
|
|
Feb 18, 2021 at 15:35 | vote | accept | Andrew Newby | ||
Feb 18, 2021 at 15:32 | history | edited | Bayou | CC BY-SA 4.0 |
edited body
|
Feb 18, 2021 at 15:27 | history | answered | Bayou | CC BY-SA 4.0 |