Windows to UNIX issues


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Windows to UNIX issues
# 8  
Old 06-30-2010
Thanks for the info pludi. There was reference to CAT instead of cat and once it was changed the script worked.

Thanks <3

---------- Post updated at 05:03 AM ---------- Previous update was at 04:10 AM ----------

The next error I can't manage to fix (or google) is: stty: invalid argument `-oproc'
It's from the line: echo "$PROMPT\c"; stty -oproc; read ANS

I tried just removing the -oproc but I get: speed 38400 baud; line = 0;
being displayed.

I tried removing the stty part all together but it becomes a never ending loop (loop only ends when S or D is specified but without the stty S or D isn't accepted either despite the rest appearing right).

Here's the function for more info on the code: pastebin - Stuff - post number 1892380

Last edited by Dird; 06-30-2010 at 07:17 AM..
# 9  
Old 06-30-2010
What Operating System are you running?
If a "stty" command is not in a "stty -a" display, it does not exist.
You may have to omit the "stty -oproc" command completely and redesign your screen layout. Interfering with what happens when the user enters data is not normal practice.
This User Gave Thanks to methyl For This Post:
# 10  
Old 06-30-2010
Hi,

The script was initially on a windows machine with MKS Toolkit. oproc is a command for that which "Corresponds to the Win32 ENABLE_PROCESSED_OUTPUT mode. Allows ASCII control sequences and backspace, tab, bell, carriage return, and linefeed to be processed by the system. If this mode is not set, then these special ASCII characters simply appear on the screen as special characters, rather than the appropriate motion (or sound, in the case of the bell character)."

I guess I need a UNIX equivalent (its now on unix...or maybe RH). I tried changing it to ; stty -a; but it threw out a load of text (possible -commands).

Edit: Ok it was a problem with case. I guess in windows it wasn't case sensitivie and so:
get_ans " (S)ummary or (D)etailed report ? " "s d"
worked. When I enter 's' it is treated as 'S' but the variables passed remain as 's' so they never match. Thanks for trying to help though.

Last edited by Dird; 06-30-2010 at 07:43 AM..
# 11  
Old 06-30-2010
Quote:
stty -a
Is an enquiry about all the current "stty" settings for your terminal. You can then see what they mean in "man stty". Your error message was because "stty -opost" is invalid on your Operating System.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Issues with passwordless sftp2 from windows to Linux using F-Secure SSH Client

Hi, I am facing problems whie trying to do a passwordless ssh to Unix box from windows. Public key was generated using F-secure. When the F-secure client attempts it connects without password but when I try to use sftp2 in command line it prompts for password. I have tried several options and... (0 Replies)
Discussion started by: dhrajj
0 Replies

2. Windows & DOS: Issues & Discussions

Windows 7 64 bit issues with X11

Hi, I was hoping that somebody could assist me with the following issue. I recently installed a windows 7 64 bit professional on a desktop with following specs: Intel Core i7 3.4Ghz, 16 GB DDR3 RAM, AMD Radeon HD 6450. (Which was a upgrade of a xp 32 bit based system) Since I'm more... (10 Replies)
Discussion started by: kristofvdo
10 Replies

3. UNIX for Dummies Questions & Answers

Cygwin/X11 issues on Windows 7

Hi All, I recently upgraded to windows 7 and am therefore reinstalling cygwin/x11 after a long time. On XP I would start xterm from the startxwin.bat file. I am experiencing trouble starting with the startxwin executable which is the new recommended startup method as well as afew other... (2 Replies)
Discussion started by: ScKaSx
2 Replies

4. Solaris

Windows,Solaris, Red Hat triple boot issues

I have a pentium IV with 512 MB ram and 80 GB HDD. I first installed windows XP on the first primary partition, then Solaris on the second with 20 GB for the solaris partition, and when rebooted , the grub menu functioned as expected giving me the options to dual boot, so next I wanted to install... (3 Replies)
Discussion started by: saagar
3 Replies
Login or Register to Ask a Question