Groups | Search | Server Info | Login | Register
Groups > comp.os.linux.misc > #85924
| From | jayjwa <jayjwa@atr2.ath.cx.invalid> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: CUPS print to FAX for Brother MFC printers |
| Date | 2026-04-25 12:01 -0400 |
| Organization | atr2net 2026 |
| Message-ID | <87ldeb58rx.fsf@atr2.ath.cx> (permalink) |
| References | <10s453n$5uph$1@dont-email.me> <8tjnbmxas1.ln2@Telcontar.valinor> <10sb89u$29ko5$4@dont-email.me> <p9lnbmx7q7.ln2@Telcontar.valinor> <n4v73kF414dU1@mid.individual.net> |
Allodoxaphobia <trepidation@example.net> writes:
>> A script that starts with #!/bin/bash will just work anywhere.
>
> Well, not in any *BSD
>
> The 'universal', 'smart' way is: #!/usr/bin/env bash
The assumption is that "env" will always always always live in /usr/bin
on any *nix system, while bash and friends might live in /bin or
/usr/bin or even some other place if bash is not the default shell (such
as on older versions of Solaris). Calling env in a shebang with no other
arguments just seeks out the executable you give it, providing it is in
the user's PATH.
uname
Linux
ls -l /usr/bin/env /usr/bin/bash /bin/bash /bin/env
-rwxr-xr-x 1 root root 1362000 Dec 12 16:50 /bin/bash*
-rwxr-xr-x 1 root root 56496 Apr 20 16:48 /bin/env*
lrwxrwxrwx 1 root root 9 Dec 15 09:28 /usr/bin/bash -> /bin/bash*
lrwxrwxrwx 1 root root 13 Apr 23 12:01 /usr/bin/env -> ../../bin/env*
uname
SunOS
which bash env
/usr/bin/bash
/usr/bin/env
ls -l /usr/bin/bash /usr/bin/env
-r-xr-xr-x 1 root bin 1.5M Jan 28 11:38 /usr/bin/bash*
-r-xr-xr-x 1 root bin 13K Apr 12 19:11 /usr/bin/env*
On some systems, /bin is now a symlink to /usr/bin.
file -h /bin
/bin: symbolic link to ./usr/bin
That means /bin/bash would still work there even without env.
I've never seen a system where /usr was a mount point. Maybe that was a
thing in the 80s or 90s. Early on, Slackware was set up so that /usr
could be, for example, remote mounted via NFS but that's not been the
case in a very long time. Some people remote mount their ~/ but that's a
different issue entirely.
In actual practice, the difference between systems is great enough that
using /usr/bin/env bash doesn't give you much in return anyway and you
still have to write specifically for the system you're on. ls, grep,
make, and some others are not the GNU versions by default on Sun, and
even tar will cry if you ask it "tar --version".
tar --version
tar: s: unknown function modifier
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPTvw@/[0-7]][bf][X...] [j|J|z|Z] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...
I'd assume this is the situation on HP-UX, AIX, Ultrix, BSD family,
etc. If you're only writing for Linux, /bin/bash is very safe.
Lastly, you can env shebang python. This works on Linux, Sun, and likely
*BSD.
nano demoenv.py
chmod 755 demoenv.py
./demoenv.py
This is from Python
cat demoenv.py
#!/usr/bin/env python3
print( "This is from Python" )
Oh, we were talking about printers? I hate them and gave up on them
decades ago because they almost never work correctly outside of Windows
or Mac and getting CUPS to dance is a nightmare. Just use a kiosk at
some office store.
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar
CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-20 03:04 +0000
Re: CUPS print to FAX for Brother MFC printers 🇵🇱Jacek Marcin Jaworski🇵🇱 <jmj@energokod.gda.pl> - 2026-04-20 13:09 +0200
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-20 13:07 +0000
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-20 15:07 +0000
CUPS print to FAX for Brother MFC printers, source code and manual (pt 1) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-22 14:25 +0000
Re: CUPS print to FAX for Brother MFC printers, source code and manual (pt 1) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-22 14:27 +0000
Re: CUPS print to FAX for Brother MFC printers, source code and manual (pt 1) Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-23 08:22 +0000
Re: CUPS print to FAX for Brother MFC printers, source code and manual (pt 1) "J.O. Aho" <user@example.net> - 2026-04-23 10:09 +0200
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-22 21:24 +0200
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-22 19:41 +0000
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-22 21:48 +0200
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-23 01:14 +0000
Re: CUPS print to FAX for Brother MFC printers Allodoxaphobia <trepidation@example.net> - 2026-04-23 18:35 +0000
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-23 20:05 +0000
Re: CUPS print to FAX for Brother MFC printers Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-04-25 09:39 +0000
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-23 22:30 +0200
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-23 20:53 +0000
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-23 23:05 +0200
Re: CUPS print to FAX for Brother MFC printers Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-23 22:13 +0000
On the sensibility of portable scripts Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-04-27 06:19 +0000
Re: On the sensibility of portable scripts Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-27 08:12 +0000
Re: On the sensibility of portable scripts "Carlos E.R." <robin_listas@es.invalid> - 2026-04-27 12:42 +0200
Re: On the sensibility of portable scripts Ian <gay@sfuu.ca> - 2026-04-27 09:43 -0700
Re: On the sensibility of portable scripts rbowman <bowman@montana.com> - 2026-04-27 18:11 +0000
Re: On the sensibility of portable scripts "Carlos E.R." <robin_listas@es.invalid> - 2026-04-27 23:24 +0200
Re: On the sensibility of portable scripts Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-27 22:37 +0000
Re: On the sensibility of portable scripts c186282 <c186282@nnada.net> - 2026-04-27 22:26 -0400
Re: On the sensibility of portable scripts Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-04-28 07:52 +0200
Re: On the sensibility of portable scripts rbowman <bowman@montana.com> - 2026-04-27 18:08 +0000
Re: On the sensibility of portable scripts "Carlos E.R." <robin_listas@es.invalid> - 2026-04-27 23:36 +0200
Re: On the sensibility of portable scripts rbowman <bowman@montana.com> - 2026-04-27 18:06 +0000
Re: On the sensibility of portable scripts "Carlos E.R." <robin_listas@es.invalid> - 2026-04-27 13:07 +0200
Re: On the sensibility of portable scripts Richard Kettlewell <invalid@invalid.invalid> - 2026-04-27 21:00 +0100
Re: CUPS print to FAX for Brother MFC printers Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-24 04:39 +0000
Re: CUPS print to FAX for Brother MFC printers Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-04-25 09:41 +0000
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-25 13:57 +0200
Re: CUPS print to FAX for Brother MFC printers Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-24 04:38 +0000
Re: CUPS print to FAX for Brother MFC printers Richard Kettlewell <invalid@invalid.invalid> - 2026-04-24 08:45 +0100
Re: CUPS print to FAX for Brother MFC printers Stéphane CARPENTIER <sc@fiat-linux.fr> - 2026-04-25 09:51 +0000
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-24 10:57 +0200
Re: CUPS print to FAX for Brother MFC printers The Natural Philosopher <tnp@invalid.invalid> - 2026-04-24 10:31 +0100
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-24 11:43 +0200
Re: CUPS print to FAX for Brother MFC printers The Natural Philosopher <tnp@invalid.invalid> - 2026-04-24 11:11 +0100
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-24 12:50 +0200
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-24 11:45 +0200
Re: CUPS print to FAX for Brother MFC printers The Natural Philosopher <tnp@invalid.invalid> - 2026-04-24 11:11 +0100
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-24 12:51 +0200
Re: CUPS print to FAX for Brother MFC printers The Natural Philosopher <tnp@invalid.invalid> - 2026-04-24 13:42 +0100
Re: CUPS print to FAX for Brother MFC printers Bobbie Sellers <bliss-sf4ever@dslextreme.com> - 2026-04-24 18:53 -0700
Re: CUPS print to FAX for Brother MFC printers jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-04-25 12:01 -0400
Re: CUPS print to FAX for Brother MFC printers "Carlos E.R." <robin_listas@es.invalid> - 2026-04-25 22:05 +0200
Re: CUPS print to FAX for Brother MFC printers Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-04-26 01:18 +0000
Re: CUPS print to FAX for Brother MFC printers Marc Haber <mh+usenetspam2616@zugschl.us> - 2026-04-26 09:46 +0200
Re: CUPS print to FAX for Brother MFC printers jayjwa <jayjwa@atr2.ath.cx.invalid> - 2026-04-26 11:31 -0400
Re: CUPS print to FAX for Brother MFC printers John Bokma <contact@johnbokma.com> - 2026-04-26 19:31 +0200
Re: CUPS print to FAX for Brother MFC printers The Natural Philosopher <tnp@invalid.invalid> - 2026-04-26 20:18 +0100
Re: CUPS print to FAX for Brother MFC printers Lars Poulsen <lars@beagle-ears.com> - 2026-04-27 15:56 -0700
csiph-web