We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
We have a system consisting of dozens of executables and a number of scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
The OS doesn't care. Do whatever's most convenient for the humans who
will actually be using the system.
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
File managers also know what to open a .sh file with, short of
running something like "file" over everything (which I guess some
probably do).
On Thu, 07 Sep 2023 18:41:57 -0400, Computer Nerd Kev <not@telling.you.invalid> wrote:
File managers also know what to open a .sh file with, short of
running something like "file" over everything (which I guess some
probably do).
A file manager should not be choosing how to execute a script, and I don't know
of any that do.
By "open" I meant "view/edit". I wouldn't run/execute a script file
from a file manager interface out of preference. If a file manager
called that "opening", I'd be immediately confused.
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
Just when you thought the Ford vs. Chevy debate had died down...
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
Just when you thought the Ford vs. Chevy debate had died down...
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files) have
a .bat suffix. So far I've written the Linux version so that neither executables nor scripts have a suffix. However, our support people want
to be able to easily grab copies of all scripts (e.g. for backups). If
I were to modify the system so that all scripts have a .sh suffix, that
would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix is desirable. So I thought I'd throw out the question here.
Just when you thought the Ford vs. Chevy debate had died down...
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
Just when you thought the Ford vs. Chevy debate had died down...
On 9/7/23 23:24, Charlie Gibbs wrote:
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for
backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
In the Linux/Unix world no suffix is required but executables are
identified from their file mode being executable. Windows has no such
file mode and uses the extension to detect a file as executable.
On 2023-09-07 17:24, Charlie Gibbs wrote:
We have a system consisting of dozens of executables and a number of
scripts, some of which are run automatically. In the Windows version,
the executables have a .exe suffix and scripts (a.k.a. batch files)
have a .bat suffix. So far I've written the Linux version so that
neither executables nor scripts have a suffix. However, our support
people want to be able to easily grab copies of all scripts (e.g. for
backups). If I were to modify the system so that all scripts have a
.sh suffix, that would satisfy this wish.
I've searched the web in various places (including stackoverflow)
and found lots of conflicting information over whether a .sh suffix
is desirable. So I thought I'd throw out the question here.
Just when you thought the Ford vs. Chevy debate had died down...
The system does not care, the humans do.
However, changes on a system "in production" can be disruptive. You may
cause other tools that already know the name of a script to fail. Or you
may decide at some point to recreate a script as a binary and have to
rename the extension.
Also, the backup may miss scripts that don't have the extension
(forgotten), so I'd say that your support system should make the backup
based on other criteria, like examining the start of a file to find out
what type it actually is.
Most of our people were born and raised on Windows, and it'll take a
bit of work to wean them off Microsoft's worship of file extensions.
I could shoot their sacred cow with something like
cp -p $(file * | grep script | cut -d: -f1) $BACKUPDIR
although it would be more palatable if they could just say
cp -p *.sh $BACKUPDIR
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 299 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:14:05 |
Calls: | 6,690 |
Files: | 12,225 |
Messages: | 5,345,454 |