How to invoke bash, run commands inside the new shell, and then give control back to user?

bash –rcfile <(echo ‘. ~/.bashrc; some_command’) dispenses the creation of temporary files. Question on other sites: https://serverfault.com/questions/368054/run-an-interactive-bash-subshell-with-initial-commands-without-returning-to-the https://unix.stackexchange.com/questions/123103/how-to-keep-bash-running-after-command-execution

Open a file from Cygwin

You can also use the cygwin utility: cygstart <your file> To make things OSX-like add the following to your bashrc alias open=’cygstart’ Don’t forget to check out the man page for cygstart.

Shell script to set environment variables

You need to run the script as source or the shorthand . source ./myscript.sh or . ./myscript.sh This will run within the existing shell, ensuring any variables created or modified by the script will be available after the script completes. Running the script just using the filename will execute the script in a separate subshell.

How do I preserve the remote filename when Downloading a file using curl [duplicate]

The solution is to use -O -J -O, –remote-name Write output to a file named as the remote file -J, –remote-header-name Use the header-provided filename So… curl -O -J ‘http://oregondigital.org/cgi-bin/showfile.exe?CISOROOT=/baseball&CISOPTR=0′ I had to upgrade my CURL. I had v 7.19 which doesn’t support -J but 7.22 (which is the latest) does.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)