New answers tagged

0 votes

"su" does not work on FreeBSD

I've had the problem while using chroot'ed 32-bit libraries on a 64-bit version of FreeBSD. At first I thought something with ldconfig -32 might help, but than I noticed it was using PAM and/or ...
1 vote

How to make timeout(1) behave in cron like it behaves in interactive shell

Due to the double quotes, $? is being expanded before the bash command is invoked. It is being replaced by the exit status of the previous command (which was the first exit $?) A quick demo bash -c '...
1 vote

How to make timeout(1) behave in cron like it behaves in interactive shell

You can try to run the command like this: bash -c "timeout 1 sleep 2"; echo $?
  • 3,442
0 votes

How to keep script from swallowing all of stdin?

Also, generally speaking, if you don't want some command to use current STDIN, you provide it with different one using <. E.g. s=`expect-script server1 $b < /dev/null` would make "...
  • 2,449
0 votes

Terminal only shows $?

I guess you are not using bash, but sh and your prompt is not set properly (if this is even possible with sh). you can get your current shell by typing: echo $SHELL if you want to start bash, just ...
0 votes

Can't run AWS CLI from CRON (credentials)

CREATE THE FILE HERE: /root/.aws/credentials Need to be here cause for the aws cli path is always root. [default] AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXXXX AWS_SECRET_ACCESS_KEY=...
  • 1
0 votes

Setup Apache Docker container to keep running after executing php shell CMD

Ok got a working solution now. First of all, the reason for: [core:warn] [pid 10] AH00111: Config variable ${APACHE_RUN_DIR} is not defined was that I used the wrong command tool to run apache in the ...
  • 135
0 votes

How can I display the IP address of an interface?

Works well on various linux: ip -brief address show eth0 | awk '{print $3}' | awk -F/ '{print $1}'
  • 101

Top 50 recent answers are included