create .sh file for mac

ideas & concept 9 ต.ค. 2016

When you forget command line for run something …
you can put it in a .sh file that looks like this.

#!/bin/bash
ulimit -n 2048 && mongod

Note that ‘\’ become ‘/’.

You could execute as

sh myfile.sh

or set the x bit on the file

chmod +x myfile.sh

and then just call

myfile.sh

ref: http://stackoverflow.com/questions/14065069/equivalent-of-bat-in-mac-os

แท็ก

Onyx

Just a middle-aged programmer, Can do many things but not the most.