Re: good shell script examples?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]





On Mon, Nov 15, 2010 at 13:54, Max Hetrick <maxhetrick@xxxxxxxxxxx> wrote:
On 11/15/2010 01:47 PM, Kill Script wrote:
> I am looking for a beginner guide to shell scripting simple tasks on
> CentOS (e.g. ssh'ing into a server / router / switch, checking for
> certain things, then exiting and going to the next IP).
>
> Does anyone have any suggestions on where to look?  (I'm relatively new
> to bash)

The book Learning the bash Shell helped me out a lot.

http://oreilly.com/catalog/9781565923478

Regards,
Max

To answer your question, I have liked UNIX Shells By Example by Ellie Quigley (4th edition) it has good examples with explanations. The Linux Command line and Shell Scripting Bible is a good teaching tool. A new edition is due out next year but the current edition is still useful.

As to what you appear to want to do, if you require interactive logins (i.e. ssh keys not set up for password-less logins) then bash is not the best choice. For this you would want to use either Python (with pyexpect module) or the Expect scripting language (Expect is an extension of the TCL scripting language.

John

--
 John Kennedy

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux