Advanced

Invoking parameterized functions in ad-hoc bash scripts.

Posted by evan_summers on · Post a comment
code.google.com/p/vellum; By Evan Summers
Mail this story
Print this story

One often wishes to cut and paste commonly used commands into a shell script for later reference, and reuse. So we introduce an approach for invoking parameterized functions in a bash script.

Herewith starts a new series of articles on Bash Shell scripting tips and tricks.

One often wishes to cut and paste commonly used commands into a shell script for later reference, and reuse.

We write lots of cron scripts to perform routine maintenance tasks on our systems. We usually want a script to perform various tasks in succession, but also be able to invoke those individually in an adhoc fashion e.g. to test that task.

So in this article, we introduce a dynamic approach for invoking parameterized commands in a bash script.

Full Story

  Nav
» Read more about: Story Type: Tutorial

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments

No comments yet. Be the first.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post