3 ms·
I prefer simple and portable shell scripts too. While I use here documents a bunch too this is the first time I've seen this idiom: #!/bin/sh tail -n +
by oskarth 10y ago
I prefer simple and portable shell scripts too. While I use here documents a bunch too this is the first time I've seen this idiom:
#!/bin/sh
tail -n +3 <current-filename> | ssh -p 1234 root@myserver_ip ; exit
set -eu
...
Clever.
When you write `install`, is this another script that you have installed on the server beforehand or is it a function/alias or something? [EDIT: Duh, didn't realize this was actually a standalone program (standard but non-POSIX AFAICT) I haven't used.]
- deleted 10y ago[deleted]
- vog 10y ago> While I use here documents a bunch too this is the first time I've seen this idiom I came up with this trick to avoid nested here documents, which would make syntax highlighting unusable. > When you write `install`, is this another script that you have installed on the server beforehand or is it a function/alias or something? The "install" tool is very common on almost all Unix systems. It is usually called by a Makefile on "make install", but of course can be used by anyone.
- chelmertz 10y agoSee man install: https://linux.die.net/man/1/install https://linux.die.net/man/1/install