nitter
Ross Burton
@rossburton
15 Aug 2016
Anyone know a neat way to do FOO=$FOO:bar in bash without adding the : if FOO was empty?
2
Daniel Silverstone ๐๐๐๐ยฒ ๐ณ๏ธโ๐๐ฌ๐ง
@dsilverstone
15 Aug 2016
FOO=${FOO}${FOO:+:}bar
1
1
Ross Burton
@rossburton
15 Aug 2016
yeah that's likely the neatest solution. Damned LD_LIBRARY_PATH behaviour with lonely colons.
1
Daniel Silverstone ๐๐๐๐ยฒ ๐ณ๏ธโ๐๐ฌ๐ง
@dsilverstone
15 Aug 2016
Replying to
@rossburton
best docs for these kinds of things is 'man dash' honestly. clear, POSIX, obvious.
Aug 15, 2016 ยท 1:51 PM UTC