10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I wish to print my current shell which happens to be bash in my script check.sh
more check.sh
echo $0
echo `ps -p $$`
But instead of printing it prints check.sh i.e the name of the script for both the commands.
Can you please suggest how to print the current shell i m on inside the... (2 Replies)
Discussion started by: mohtashims
2 Replies
2. Shell Programming and Scripting
Hi All,
I have a script which does report the cpu usuage, there are few output parameter/fields displayed from the script. My problem is I have monitor the output and decide
which cpu number (column 2) has maximum value (column 6).
Since the output is displayed/updated every seconds, it's very... (1 Reply)
Discussion started by: Optimus81
1 Replies
3. Shell Programming and Scripting
Hello,
I begin to write my first shell script, but I am totally lost, hope you can help me.
I'd like to write a script with some conditions and multiples usages:
./myscript.sh -i <host>
or
./myscript.sh -e <host>
Have you some suggestion, because I am really lost, I try to do something... (12 Replies)
Discussion started by: Francesco
12 Replies
4. Shell Programming and Scripting
Hi Gurus,
I have written a script set_env.ksh to which I pass an argument and set the oracle login credentials based on the argument I pass.
The script has code as below.
ORACLE_SID=$1
DB_SCHEMA_LOGON=$DB_SCHEMA_USER/$DB_SCHEMA_PASSWORD@$ORACLE_SID; export DB_SCHEMA_LOGON;
echo... (3 Replies)
Discussion started by: Sabari Nath S
3 Replies
5. Shell Programming and Scripting
Hi,
I want to subtract 'n' days from the current timestamp in a k shell script. Is there any inbuilt function to do it
or any workaround solution to get the date. And I want the output to be in YYYY:MM:DD HH:MM:SS format. Please help.
Thanks in advance. (4 Replies)
Discussion started by: Suryaaravindh
4 Replies
6. Shell Programming and Scripting
Hi
I am using korn shell is there a built in or ny other way to get the current line number so i can write the current line number to the logfile to aid in debugging like
logmsg $lineno $date
logmsg is a helper function that helps in logging messages to a log file
regards (3 Replies)
Discussion started by: xiamin
3 Replies
7. Solaris
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies
8. Shell Programming and Scripting
Hello all,
I'm new to shell programming and need some help. I would like to set up a step within a shell script to trigger another shell script to run, based on the highest return code generated in the current script. For example, if the highes return code value in the current script is less... (1 Reply)
Discussion started by: mmignot
1 Replies
9. Shell Programming and Scripting
How do i run a shell script or perl script with in the context of a current shell.
I know that i can use command source. but we can't pass any arguments to
our script if we use source command as it takes only one argement i.e filename
Is there any way to run a script in the current shell... (5 Replies)
Discussion started by: Naresh Kumar
5 Replies
10. UNIX for Dummies Questions & Answers
Hi all
Wanted to know if there is a command that gives me the bandwidth used at any point of time (in mbps). I pay for the bandwidth I have used and need to be alerted everytime I corss over a certain limit.
Regards
KS (5 Replies)
Discussion started by: skotapal
5 Replies