When is using a ";" (semi-colon) in a script vital to it?

CrazedNerd

Gold Member
Gold Supporter
Joined
Mar 31, 2021
Messages
593
Reaction score
235
Credits
5,017
I'm currently reading "bash idioms", and i was happy to know that in a script, you don't actually need ; for commands, you can just put the next thing on a line. In this respect it's like python. Are there times when you need to use the semicolon for multiple lines of code?
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,514
Reaction score
2,152
Credits
10,890
When you’re trying to run multiple commands on a single line, without entering them as separate lines!
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top