Linux Blog

To Script, or not To Script

Filed under: Shell Script Sundays — TheLinuxBlog.com at 3:23 pm on Sunday, December 21, 2008

I hate doing manual repetitive labor. There is something about it that just bores me to death. Perhaps this is why I like shell scripting so much. To me it is one of the most useful things about the terminal. All the time I’m working I’m thinking about automation.

“Can this be automated?”
“Can I improve this process?”

Most of the time tasks can be automated in some fashion, and a simple shell script can be written. Its very useful. One of the problems about being able to shell script is the self discipline to say, no I’ll do this by hand. The reason being is that a lot of the time the learning curve and potential problems of automating a process are costly upfront, therefore taking you more time in the long run. So, next time you think about using shell scripting for automation ask yourself if it is really worth it. Depending on your workload, perhaps on the third of fourth time round it will be worth considering it. If you’re not busy and are up for a challenge, by all means knock yourself out!





Random Man Pages:
madvise
shadow
iso_8859-2
mouse

4 Comments »

Comment by brainspoil

December 21, 2008 @ 3:45 pm

And if the script is something useful, share it with the community. I’m always looking for a better way to do things.Happy Holidays!

Comment by nick

December 22, 2008 @ 12:45 pm

my favorite command-line command is the ‘for-loop’, yes the for loop can turn any simple repetitive command into a single one-line command statement. So lately I’ve been writing less ‘scripts’ and more really long command line statements….

Comment by Binny V A

December 26, 2008 @ 3:00 am

For such purpose, use a higher level language – like perl or python instead of bash. This should save you time.

Comment by TheLinuxBlog.com

December 26, 2008 @ 11:51 pm

Thanks for the comments guys,

@BRAINSPOIL Agree 100%

@NICK the for loop is a great way to repeat tasks :)

@BINNY V A It depends on the task, I don’t know Python well enough to just roll with it, but Perl or PHP do the trick :)

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>