python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Running 'bash -i' in re-invoked script (via sudo -S) exits immediately - why?
When I launch the following script, it restarts as root, the new bash shell opens up, but "something" sends an "exit" command immediately and the script runs to its end.
#!/bin/bas...

Holger Pandel
Votes: 0
Answers: 0
Make cannot be called from script without sourcing the script
I want to call the make command from a bash script in a MinGW bash shell. However the script seems to know "make" only when I call the script using source:
build.sh:
#!/bin/bash
make all
Ca...
user17949438
Votes: 0
Answers: 0
Running commands in a loop without spawning a new subshell each time
I have a bash script that reads in lots of dates in epoch time, and determines the (local) hour of the day at which they occurred. Relevant snippet:
while read ts
do
hour="$(date -d@$((${ts} / ...

chiastic-security
Votes: 0
Answers: 1