Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by juped on Tuesday January 07, 2020 @04:32PM
(#21985140)
Most people who use Unix directly build up some stuff in ~/bin (often a misnomer because it's shell scripts and not binaries, although mine is less of a misnomer than most because so much is in C rather than shell). The trick is to build them out of the standard portable components that exist everywhere. (This means, among other things, no #!/bin/bash.)
[ Parent
| on HN ]
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by chriswitts on Wednesday January 08, 2020 @01:15AM
(#21988827)
You shouldn't be using `#!/bin/bash` but rather `#!/usr/bin/env bash` instead.
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by Lerc on Wednesday January 08, 2020 @03:37PM
(#21995518)
I know this but usually don't do it. Been burnt by it too. Reprogramming your brain is hard.
[edit] Would there be any negative consequences to having an automated process go through and change it? Maybe the size difference might cause some issues with some things doing black magic with data in the file.
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by tuldia on Tuesday January 07, 2020 @05:06PM
(#21985545)
sed 's| no | not only |'
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by tingletech on Tuesday January 07, 2020 @06:53PM
(#21986610)
/bin/bash won't usually ship with a BSDish OS because of the license, so it is not generally portable to use bash-isms. (HPUX, IRIX, SunOS, Solaris, etc. I don't reckon would have had bash either)
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by Galanwe on Tuesday January 07, 2020 @08:00PM
(#21987147)
Not to mention once installed on a BSD it would most likely reside in /usr/bin/bash (OpenBSD for instance)
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by cperciva on Tuesday January 07, 2020 @11:54PM
(#21988484)
Or /usr/local/bin/bash (on FreeBSD).