Menu
One thing that can be frustrating coming from Linux to a Mac is that there is no /proc pseudo-file system. This has broken a number of my Linux scripts, and it can be tricky to find suitable ways to get the same information you find in proc into your Mac bash script. Best app cleaner mac os x downloads. The subject kind of says it all. Mac pro delete an app. Since applications are '.app' directories, and executing the binary in the MacOS subdir doesn't seem to work, is there a way to launch a MacOS application from a shell?
If you constantly run the same set of commands at the command line, why not automate that? Best mac writing app free. Mac photos app search.
I found myself typing the same things over and over to deploy this website. Here’s how I encapsulated it into a script that saves me keystrokes at the command line.
1) Create a new text file with a .sh
extension.
I created a new file called
deploy.sh
for my website.2) Add #!/bin/bash
to the top of it.
This is necessary for the “make it executable” part.
3) Add lines that you’d normally type at the command line.
As an example, here’s the full contents of the file I use to deploy general updates to andrewcbancroft.com
4) At the command line, run chmod u+x YourScriptFileName.sh
I ran
chmod u+x deploy.sh
to make mine executable.5) Run it whenever you need!
Now, whenever I deploy changes to my website, I run
Please enable JavaScript to view the comments powered by Disqus.comments powered by ./deploy.sh
and boom. Done.