10 More Discussions You Might Find Interesting
1. Programming
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
2. Shell Programming and Scripting
Script name is test.ksh
I know that that the ssh command is working properly, this can be verified by the value returned in respond variable. It is unique to the remote server
_____________________________________________________
respond=$(ssh $remoteHost find... (3 Replies)
Discussion started by: Adagio
3 Replies
3. Shell Programming and Scripting
I am trying to find the number of files whose name starts with uni.
Below is the code but it is giving error. :confused:
#!/bin/csh
FILES_NAME ='files_list';
FILE_NAME_PATTERN = 'uni*';
NO_OF_FILES;
ls -l $FILE_NAME_PATTERN > $FILES_NAME ;
NO_OF_FILES = `wc -l $FILES_NAME`;
echo... (3 Replies)
Discussion started by: hiten.r.chauhan
3 Replies
4. Shell Programming and Scripting
I'm using a shared server on Hostgator (Linux CentOS). I'm trying to set a cron job using the Control Panel that will check if its already running before starting a new one.
I've tried the following...
* * * * * &&
but I get this error emailed to me...
/bin/sh: line 0:
Any... (5 Replies)
Discussion started by: tech9821
5 Replies
5. UNIX for Dummies Questions & Answers
I'm guessing i have a syntax error. I'm not sure it get's past the the while condition. I get an error 0 not found. Simple loop not sure what I'm doing wrong.
#!/usr/bin/ksh
set -A MtPtArray /u03 /u06
tUbound=${#MtPtArray
}
echo $tUbound
i=0
while ($i -lt $tUbound)
do
print... (4 Replies)
Discussion started by: KME
4 Replies
6. UNIX for Advanced & Expert Users
Hi
How to prevent grep command from throwing a system trap(or returning error status) if No match is found in the specified file(s) ?
Consider this simple shell script:
#!/usr/bin/ksh
trap 'STATUS=$?;set +x;echo;echo error $STATUS at line nb $LINENO executing :\
`sed -n... (2 Replies)
Discussion started by: cool.aquarian
2 Replies
7. Shell Programming and Scripting
i have this script which works fine but shows errors when it runs..these are more like warnings and the script runs fine.. i am on a sun machine.. i know it writes all the error messages to a master log file.. is there any way i can turn off these warnings/error messages and prevent them from being... (2 Replies)
Discussion started by: npatwardhan
2 Replies
8. Linux
Hi Guys
I am using this version of Linux box (as shown below). I am unable to send email from the box. But I am not getting any errors while sending email. :mad:
Any idea what could be the reason? What entry should I check? :confused:
$ uname -a
Linux machine-name 2.4.21-144-smp4G #1... (6 Replies)
Discussion started by: csaha
6 Replies
9. Shell Programming and Scripting
I am more or less new to using cron, and I am trying to automate a log cleaning system I have made. The system basically cleans through WWW logs that are mounted on an NFS and creates text files for entry into a local PostgreSQL DB.
For the past year I have been running the various scripts and... (3 Replies)
Discussion started by: mntamago
3 Replies
10. UNIX for Dummies Questions & Answers
I am running some shell scripts through a foll cron job, the script works fine and there are no errors in the log file but I receive the following error in mail for the jobs:
stty: no such device or address
What does the above error indicate, here is the cron job:
0 22 * * 0... (2 Replies)
Discussion started by: knarayan
2 Replies