01-11-2007
I'd say learn both. Most of my day-to-day automation is done using shell scripting (ksh/bash). Shell scripting is also a must for writing init scripts, etc, and you'll be surprised at how often you'll find yourself using conditional constructs and loops on the command line once you get proficient.
e.g.
for server in $servers; do ssh $server do_something; done
mailq | grep -B1 "Connection refused" | awk '{print $1}' | sed 's/\*$//' | while read id; do qtool -d /var/spool/mqueue/$id; done
You get the idea....
However, when interaction with databases is required, or real heavy duty reporting and text file parsing, I always write in Perl for the sheer flexibility of the language, the rich collection of modules available and the powerful regular expressions at your disposal.
PHP is another good language to pick up later on as you can create administrative web-based interfaces very easily. And a little C is never a bad thing.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all
I am trying to document my entire system (hardware/software/admin) Is there a template I could use for the purpose. This document will be the used by all System admins/ Management the company when they want to find out anyting about any of the servers we manage.
If there is no such... (6 Replies)
Discussion started by: skotapal
6 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I want to send system info like disk utilization, memory and things like that to be displayed on a web page.
gathering the system info is simple. What do I use to transfer the data to the web server? Once the data is there, its not my problem anymore :D
Thanks for any leads (5 Replies)
Discussion started by: 406
5 Replies
3. AIX
Hi everyone, im new to AIX, where can I find some free beginner AIX System admin guide which is similar to
AIX Basic Operations V5
http://www-03.ibm.com/certify/tests/obj190.shtml (9 Replies)
Discussion started by: ibmer414
9 Replies
4. Shell Programming and Scripting
I do not know UNIX shell scripting so as an alternative which language would you think is better for daily System Administration tasks. Perl or PHP? I know a little about both. (5 Replies)
Discussion started by: blackopus
5 Replies
5. AIX
Hello Everyone...I am new to this forum and before asking i already see links for books and videos...I would like to know the tasks for L2 and L3 AIX System Admin.
edit by bakunin: You shouldn't hijack others threads for your own questions. If you have a genuine question to ask you're entitled... (3 Replies)
Discussion started by: Allhappies
3 Replies
6. HP-UX
What is a logical step forward to learn much more about HP UX?
Learn HP Integrity BladeSystem Administration or learn more about scripting?
Learn more about storage?
Can someone tell me how to become more effective? I am already working with HP UX everyday.
Thanks a lot for every reply I... (4 Replies)
Discussion started by: velde_van_der_a
4 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a group id with your last name. Create 2 user IDs using your last name and the numbers 1 and 2. For each... (3 Replies)
Discussion started by: Jagst3r21
3 Replies
8. Red Hat
Hi,
I am looking for perfect document.which is covered all the admin role with examples.....
--> Please say that "search in google"......
Can you please help on this....
Thanks & Regards,
Mani (3 Replies)
Discussion started by: Mani_apr08
3 Replies
9. Linux
Hi,
I am already working as Linux admin for last 5 years. Now I want to do something more. So wanted to ask you guys what would be better. I have 2 interests for making my future
1. Linux kernel development
2. Linux system admin + storage
Welcome your thoughts!!! (5 Replies)
Discussion started by: prashant2507198
5 Replies
10. Red Hat
hello, when the times comes where do I schedule for the linux system admin exam? I have taken exams before through vue or prometric I did not see rh system admin exam on either site? any feedback would be helpful such as cost? how many test is it one or two? is the comptia linux+ just as recognized... (3 Replies)
Discussion started by: arcolinux
3 Replies
LEARN ABOUT MOJAVE
jrunscript
jrunscript(1) General Commands Manual jrunscript(1)
NAME
jrunscript - command line script shell
SYNOPSIS
jrunscript [ options ] [ arguments... ]
PARAMETERS
options
Options, if used, should follow immediately after the command name.
arguments
Arguments, if used, should follow immediately after options or command name.
DESCRIPTION
jrunscript is a command line script shell. jrunscript supports both an interactive (read-eval-print) mode and a batch (-f option) mode of
script execution. This is a scripting language independent shell. By default, JavaScript is the language used, but the -l option can be
used to specify a different language. Through Java to scripting language communication, jrunscript supports "exploratory programming"
style.
NOTE: This tool is experimental and may not be available in future versions of the JDK.
OPTIONS
-classpath path
Specify where to find the user's .class files that are accessed by the script.
-cp path
This is a synonym for -classpath path
-Dname=value
Set a Java system property.
-Jflag
Pass flag directly to the Java virtual machine on which jrunscript is run.
-l language
Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to spec-
ify the corresponding script engine's jar file using -cp or -classpath option.
-e script
Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line.
-encoding encoding
Specify the character encoding used while reading script files.
-f script-file
Evaluate the given script file (batch mode).
-f -
Read and evaluate a script from standard input (interactive mode).
-help
Output help message and exit.
-?
Output help message and exit.
-q
List all script engines available and exit.
ARGUMENTS
If [arguments...] are present and if no -e or -f option is used, then the first argument is the script file and the rest of the arguments,
if any, are passed as script arguments. If [arguments..] and -e or -f option are used, then all [arguments..] are passed as script argu-
ments. If [arguments..], -e and -f are missing, interactive mode is used. Script arguments are available to a script in an engine variable
named "arguments" of type String array.
EXAMPLES
Executing inline scripts
jrunscript -e "print('hello world')"
jrunscript -e "cat('http://java.sun.com')"
Use specified language and evaluate given script file
jrunscript -l js -f test.js
Interactive mode
jrunscript
js>print('hello world');
hello world
js>34 + 55
89
js> thread(function() { print('hello world'); }
hello world
js>
Run script file with script arguments
jrunscript test.js arg1 arg2 arg3
test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "argu-
ments" array.
SEE ALSO
If JavaScript is used, then before evaluating any user defined script, jrunscript initializes certain built-in functions and objects. These
JavaScript built-ins are documented in jsdocs.
06 Aug 2006 jrunscript(1)