Bad File Number Error In Unix
Contents |
View Site Leaders Advanced Search Forum Pentaho Users Pentaho Data Integration [Kettle] Shell Script Error:bad file number. If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have ssh: connect to host port 22: bad file number to register before you can post: click the register link above to proceed. To start
Bad File Number Error In Linux
viewing messages, select the forum that you want to visit from the selection below. Results 1 to 8 of 8 Thread: Shell Script Error:bad ssh bad file number aws file number. Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 12-12-2008,05:42 AM #1 ranjini View Profile View Forum Posts Private Message bad file number android Member Join Date Oct 2006 Posts 35 Shell Script Error:bad file number. Hi, I have designed a ETL job to invoke a shell script that emails a text file to the specified address. Every time I execute the job, i receive a error that says Shell Script.. Bad file number. But the shell script is invoked correctly without any issues and the data file is also emailed to the correct email id's. We are using kettle 3.0.2. The
Ssh: Connect To Host Port 22: Connection Timed Out Fatal: Could Not Read From Remote Repository.
shell script error is thrown when we try to run the job in the Unix box through kitchen.sh. Need to resolve this issue. Any kind of suggestions are welcome. Thanks in Advcance, Ranjini Reply With Quote 12-12-2008,05:51 AM #2 sboden View Profile View Forum Posts Private Message Senior Member Join Date May 2006 Posts 4,882 Try putting a "#!" in the start of the script (using th correct shell of course). Regards, Sven Reply With Quote 12-12-2008,06:31 AM #3 ranjini View Profile View Forum Posts Private Message Member Join Date Oct 2006 Posts 35 The #! command is already invoked in the shell script. As already mentioned the required task is being done as expected. Except for the Bad file number message that is displayed. Regards, Ranjini Reply With Quote 12-12-2008,07:13 AM #4 sboden View Profile View Forum Posts Private Message Senior Member Join Date May 2006 Posts 4,882 Then it's probably something to do with rerouting stdout/stderr... If I remember correctly the PDI does this, so if you would close them in your script you should get an error like you get now. Regards, Sven Reply With Quote 12-12-2008,07:24 AM #5 ranjini View Profile View Forum Posts Private Message Member Join Date Oct 2006 Posts 35 Yes.. your guess is right. It's the stdout error. The error is as given below: (LogWriter.javarintln:403) -Shell script to email and scp the feed
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack connect to host github.com port 22 connection timed out Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack ssh attempt to connect timed out without establishing a connection Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up bad number Error
Ssh: Connect To Host Github.com Port 22: Connection Refused
KSH Script up vote 0 down vote favorite I am very new to Unix and this is one of my first scripts. I cannot seem to resolve this bad number error, and have searched for an answer online. I have not had http://forums.pentaho.com/showthread.php?66800-Shell-Script-Error-bad-file-number much luck so I though I would turn here. Can someone help me out, I keep getting this :bad number error for both variables. Here is my script, thanks!: #!/bin/ksh dest=$1 fileName=$2 id=$$ print_message() { message="$1" echo "`date '+%m-%d-%y %T'` $message" } if [ $1 -eq "" ] || [ $2 -eq "" ] then print_message "Parameters not satisfied" exit 1 fi gpg --encrypt --recipient "$dest" "$fileName" print_message "$id INFO: File Encrypted Successfully" unix ksh share|improve this question asked Aug 5 '13 at 21:25 tacotuesday 46110 http://stackoverflow.com/questions/18067997/bad-number-error-ksh-script add a comment| 2 Answers 2 active oldest votes up vote 0 down vote Your problem lies here: if [ $1 -eq "" ] || [ $2 -eq "" ] Use = instead of -eq, the latter is meant for numbers rather than strings. You may also need to wrap quotes around the possibly empty arguments, such as "$1". share|improve this answer edited Aug 5 '13 at 21:36 answered Aug 5 '13 at 21:30 paxdiablo 488k1179691416 when I use == I get an unkown test operator error –tacotuesday Aug 5 '13 at 21:35 ahh just one = Thanks! –tacotuesday Aug 5 '13 at 21:37 @user2640213, my apologies, that should have been a single =, I've fixed it up. Guess I've been using the bash [[ for too long :-) –paxdiablo Aug 5 '13 at 21:37 add a comment| up vote 0 down vote It's because you've user -eq which is meant for numerical values. You need to use = for strings. Your code should look like this: #!/bin/ksh dest=$1 fileName=$2 id=$$ print_message() { message="$1" echo "`date '+%m-%d-%y %T'` $message" } if [ $1 = "" ] || [ $2 = "" ] then print_message "Parameters not satisfied" exit 1 fi gpg --encrypt --recipient "$dest" "$fileName" print_message "$id INFO: File Encrypted Successfully" Easy mistake to make :) share|improve this answer answered Apr 24 '14 at 14:23 nafwaz 244 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Fa
known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle. Search Forums Show Threads Show Posts Tag Search Advanced Search Unanswered Threads http://www.unix.com/solaris/135733-bad-file-number.html Find All Thanked Posts Go to Page... unix and linux operating commands Bad File Number Solaris Thread Tools Search this Thread Display Modes #1 05-05-2010 Kevin1166 Registered User Join Date: Jan 2009 Last Activity: 25 September 2012, 6:44 PM EDT Location: San Diego Posts: 10 Thanks: 0 Thanked 0 Times in 0 Posts Bad File Number System Solaris 8 bad file When I open a CONSOLE window the following starts scrolling: "ServiceCommand: :write: Bad FIle Number" This will continue to scroll without stopping. However, you can type while it is scrolling and login into root and even conduct business within the CONSOLE window. The following also came up after a few minutes of the above error scrolling. "Invalid passwd from client: Client may not be using API procedding anyway" I open up bad file number a TERMINAL window, which I believe is the same as a CONSOLE window and I do not have this problem. I am baffled and not able to find much searching Google. Any assistance would be appreciated. Kevin Remove advertisements Sponsored Links Kevin1166 View Public Profile Find all posts by Kevin1166 #2 05-07-2010 RTM Registered User Join Date: Apr 2002 Last Activity: 6 August 2016, 11:44 AM EDT Location: On my motorcycle Posts: 3,093 Thanks: 1 Thanked 34 Times in 9 Posts You are getting the system warning/error messages on the console - see the man page for syslogd and look at your syslog.conf file in /etc. Suggest you don't turn it off until you understand it (you could send the output to a file versus console). A terminal window is not the same as console. man console on the server. Remove advertisements Sponsored Links RTM View Public Profile Find all posts by RTM « Previous Thread | Next Thread » Thread Tools Show Printable Version Email this Page Subscribe to this Thread Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Search this Thread Advanced Search More UNIX and Linux Forum Topics You Might Find Helpful Thread Thread Starter Forum Replies Last Po