I'm getting really excited spending more and more time using the command line.
Today I had an issue, I wanted to write a script that would ssh into a server and save the
ls from a certain path.
If you're not familiar with bash,
ls -al will list everything in a vertical list like this:
$ ls -al
I thought about how I'd do this with my limited knowledge of bash and did some googling but didn't get anywhere.
I sent out a tweet and copied in a few people.
Within 10 minutes, a few awesome people had replied all with solutions.
This is a shout out to everyone that is so freaking awesome (sorry Harry, I know I'm not American, but how I love the word :wink:) and willing to take time out of their day to help.
With the information above I was able to put a little script together:
Now I have a directory locally called
server that has a file in called
server.sh, I can
cd to it and run
bash server.sh and I end up with the
ls -al contents of the servers.
Like this post? Hire Me!