
Ask HN: What do you use to manage Terminal commands? - yoavanaki
Hello good people of HN,<p>Started programming a bit recently and found myself having to copy paste bash commands into my Terminal to restart servers, databases, etc every time I close my Terminal window&#x2F;restart my Mac. So I wanted to ask you - is there a tool that can automatically run my scripts?<p>Thanks a bunch!
======
viraptor
It sounds like you're using some specific commands to manage your services.
I'd say that's not the best way to do it. Configure each of your services so
they can be managed by `launchd`. Then all of those operations are reduced to
`launchctl start/stop some_service`. Have a look at
[http://launchd.info/](http://launchd.info/) for some more information.

Then if you don't want to type the line, you can probably get it from your
history by using ctrl-r and typing the service name.

------
wiml
A shell alias/function, a tiny shell script (which can also serve as
documentation of the reasons for a procedure), or just finding the last
invocation in my shell history with ^R.

------
humbleMouse
I write scripts for things that I do a lot. The rest of the commands I used I
keep in documents that are labeled and organized.

