Linked Questions

1 vote
0 answers
4k views

Since macOS 10.15 (Catalina) the default shell has changed from bash to zsh. One of the things I'm running into is I cannot get my own global functions working. I used to export these from ....
RocketNuts's user avatar
0 votes
1 answer
2k views

I am trying to run bash script: export LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH export SUBJECTS_DIR=/output timefmt="%C --- CPU:\t%E real,\t%U user,\t%S sys\t%P\tMem:\t%KkiBavg.,\t%MkiB max.\...
Relyativist's user avatar
1 vote
1 answer
383 views

As far as I understand, to make kernel execve a non-ELF file, the file must be a script started with a she-bang #!, but I have a script run successfully without it, why does this happen? xtricman⚓...
炸鱼薯条德里克's user avatar
0 votes
2 answers
594 views

I have a script that uses wget and saves the output to a file with a name of an incrementing variable. Counter.sh: number=1 for i in $(cat file) do wget $i -S -O $number.html 2>&1 ((number++))...
jonny b's user avatar
  • 93
1 vote
1 answer
228 views

I have some points I want to understand: I have a script written in bash syntax and does not contain the shebang line (#!/bin/bash) and my default shell is tcsh. when giving execute permission to the ...
Ahmed Edris's user avatar
1 vote
0 answers
167 views

I have this "script" on my Arch Linux system: $ cat ~/scripts/foo.sh ps -hp $$ It will simply run ps on its own PID. But the script has no shebang line. I was expecting that in the absence ...
terdon's user avatar
  • 253k
0 votes
0 answers
25 views

The following script results in error when called directly, but not when called with . ./test.sh: % cat test.sh echo "foo" | tee >(rev) % . ./process_subst_test.sh foo oof % ./...
wass rubleff's user avatar
12 votes
6 answers
2k views

I have a project comprised of about 20 small .sh files. I name these "small" because generally, no file has more than 20 lines of code. I took a modular approach because thus I'm loyal to the Unix ...
Arcticooling's user avatar
  • 4,523
16 votes
3 answers
3k views

From the Shell Command Language page of the POSIX specification: If the first line of a file of shell commands starts with the characters "#!", the results are unspecified. Why is the behavior of #! ...
Harold Fischer's user avatar
11 votes
3 answers
9k views

I have read the following in this question: bash supports a --posix switch, which makes it more POSIX-compliant. It also tries to mimic POSIX if invoked as sh. The above quote assumes that /bin/sh ...
user269904's user avatar
13 votes
3 answers
5k views

When I run this script, intended to run until killed... # foo.sh while true; do sleep 1; done ...I'm not able to find it using ps ax: >./foo.sh // In a separate shell: >ps ax | grep foo.sh ...
StoneThrow's user avatar
  • 1,957
17 votes
2 answers
2k views

I have found the following kind of shebang in the RosettaCode page: --() { :; }; exec db2 -txf "$0" It works for Db2, and a similar thing for Postgres. However, I do not understand the whole line. I ...
AngocA's user avatar
  • 295
9 votes
3 answers
12k views

On an Ubuntu ($ uname -a : Linux kumanaku 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux), I just installed fish ($ fish --version : fish, version 2.7.1) ...
suizokukan's user avatar
10 votes
3 answers
3k views

I have a shell script in which I want to add a shebang. Given a variable defined as follows: SHEBANG="#!/bin/sh" My question is if I can use that variable in another script like this: $SHEBANG # ...
Marco Favorito's user avatar
10 votes
2 answers
2k views

Scripts typically start with a shebang such as #!/usr/bin/env bash, which specifies the shell to be used for execution. The execution behavior when the shebang is not present seems to be up to the ...
Jonathan H's user avatar
  • 2,533

15 30 50 per page