grammar
Ray Andrews <[email protected]>
| Newsgroups | gmane.comp.shells.zsh.devel |
|---|---|
| Message-ID | <31418d97-46fa-4ccb-8025-802b90062ba6__37889.7466392786$1777478440$gmane$org@eastlink.ca> |
I was going thru some old stuff and I came across something like this: % if [[ $path ]] echo $path ... it works, which makes me uncomfortable because it ain't good grammar. Or is it? Without the usual: if [[ ]]; then fi ... I'm surprised that it works. Perhaps it ends up being exactly like: [[ $path ]] && echo $path ? Should I view the 'then ... fi' grammar as just optional code block controllers? And: (( length > max )) && length=max ... is there a shorter syntax for that? I'll bet there is.