Does lshwres interact directly with the terminal? Are there any options to disable this? I could sort of replicate the situation with stty:
No error!
Well, yes.
Both outputs, aren't exactly errors, why the ssh command comes back with exit code 0.
I want to understand why this message comes and how I'm able to avoid it.
Like I said: The code is working perfectly, as it is supposed to be, I just receive this message and I try to build the script to avoid it properly and not just suppress it.
Quote:
Originally Posted by RudiC
Looks like -n and -t are mutually exclusive (which seems logical if reading the man page). Try dropping the -n:
When I drop the -n parameter, the while loop will break, which is just how it is supposed to work.
The stty: standard input: Inappropriate ioctl for device message comes, regardless of which command I execute on the remote host, even a date, or test causes it, which is why I think that the ssh is responsible for it.
you said you're under Cygwin's bash.
Looks like Cygwin (at least mine) is using Windows' native ssh client:
Is that the case with you as well?
Any chance you can try the same script/steps on the native UNIX (not Cygwin on MS)?
.
.
.
When I drop the -n parameter, the while loop will break, which is just how it is supposed to work.
.
.
.
Now, it doesn't break, that is. The ssh just eats up all stdin which is redirected from .outlist.tmp, and the while read cleanly finishes on end-of-file. Did you consider using another file descriptor for redirecting its input?
you said you're under Cygwin's bash.
Looks like Cygwin (at least mine) is using Windows' native ssh client:
...
Is that the case with you as well?
Any chance you can try the same script/steps on the native UNIX (not Cygwin on MS)?
I use MobaXterm, which brings its own SSH client.
Unfortunately, for "security reasons" this Windows Terminalserver is the only connection I have to my UNIX machines.
Quote:
Originally Posted by RudiC
Now, it doesn't break, that is. The ssh just eats up all stdin which is redirected from .outlist.tmp, and the while read cleanly finishes on end-of-file. Did you consider using another file descriptor for redirecting its input?
Quote:
Originally Posted by MadeInGermany
You can connect the remote stdin to the local stdin if you use another descriptor for reading the file.
Well, yes, this works and is an idea I didn't get behind earlier.
Thank you very much!
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Hello
Just edited the entry to make it easier to understand what i want
How can i achieve this: GOAL:
read 2 field from a table with PSQL
result of this PSQL command is this
INSTALLEDLANG=$(su - postgres -c "psql -A -t -q -c -d ${DBNAME} -t -c 'SELECT code, iso_code from res_lang'")
... (0 Replies)
I have a script like this (Yes, I know the DAY6 number isn't right - I'm just testing at this point):
DAY0=`date -I`
DAY1=`date -I -d "1 day ago"`
DAY6=`date -I -d "2 days ago"`
if
then
ssh root@synology1 nohup rm -rf "/volume1/Fileserver/$DAY6"
fi
I've tested the line to remove the... (5 Replies)
Hi , I have below command to that outputs from variables..
command:
echo $INSTANCE $DATAB $status $TSLastBackup| awk '{printf("%-8s %-8s \t \n",$1,$2,$3,$4)}' | tee $LOGF
the ouput is now:
INSTANCE DATABSE BACKUP_STATUS BACKUPTIMESTAMP
------- -------- -------- ... (1 Reply)
I cannot get the following substitution ($ORACLE_SID) to work:
The variable ORACLE_SID is set to wardin my environment. It has been exported.
I have a text file called test.dat:
/u07/oradata/${ORACLE_SID}/extab/finmart/summit/ps_voucher_line_crnt_ex.dbf... (2 Replies)
Hello All
i have input files contains 2 values as following
20-Oct-09 Z59408009
20-Oct-09 Z59423060
and i am using the following script
cat /home/or/input.txt | awk '{print $2}' >log
count=0
while read line; do
count=$(( count + 1 ))
echo "UPDATE SAT_JRLTRT SET AVT='X' WHERE... (6 Replies)
Hi All
I have something that from the outset seems really trivial but in practice is not quite working.
I have the following code sample in my shell script which illustrates the problem
echo "enter home directory"
read home
mkdir $home/newdir
The user then enters a logical $HOME... (3 Replies)
I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie.
I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me.
... (2 Replies)
Greetings all,
I'm currently making use of the $HOME/.ssh/rc file to launch an automated shell script immediately after the user has been verified through ssh.
The current problem that I'm facing now is that I am unable to use the "read" command anymore... seems like the "read" statements are... (0 Replies)