<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Bourne Shell Programming Input and Output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819020#M721065</link>
    <description>Oops...i forget to read the messages properly. &lt;BR /&gt;&lt;BR /&gt;To Shannon Perty&lt;BR /&gt;-----------------&lt;BR /&gt;You can not grab a spefic amount of characters in any of the standard shells (borne, korn, csh, tcsh, bash, bash2, etc...). &lt;BR /&gt;You need to either write your own little C code (very short code) or use perl (shorter code) &lt;BR /&gt;&lt;BR /&gt;Can you show me an example of c or perl code that enable to grab a specific amount of characters? If i write something in C or Perl, can i integrate that script into my bourne shell application.&lt;BR /&gt;&lt;BR /&gt;Ian Denisson&lt;BR /&gt;-------------&lt;BR /&gt;Thank you for your advice and i will try to bear that in mind. &lt;BR /&gt;&lt;BR /&gt;Anyway thanks for everyones help.</description>
    <pubDate>Fri, 04 Oct 2002 20:33:32 GMT</pubDate>
    <dc:creator>Chua Wen Ching</dc:creator>
    <dc:date>2002-10-04T20:33:32Z</dc:date>
    <item>
      <title>Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819011#M721056</link>
      <description>I need some help here and i not sure whether bourne shell programming can do it or not. I am using hp-ux 10.20. &lt;BR /&gt;The output:&lt;BR /&gt;echo "Enter number : [0000]"&lt;BR /&gt;read inputNumber&lt;BR /&gt;&lt;BR /&gt;Just assume that the 4 zeros inside the bracket is the input that i want to enter. Example, 1111 or 2341. But if follow the source code on top, i can enter more than 4 numbers maybe 12345 or 99999. How to make it only accept 4 numbers or alphabets on the standard output (displayed on the monitor) and standard input (key in using keyboard)? Thank you.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Oct 2002 10:09:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819011#M721056</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-04T10:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819012#M721057</link>
      <description>I believe that requiers som programming in C or som other language..&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Trond</description>
      <pubDate>Fri, 04 Oct 2002 10:11:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819012#M721057</guid>
      <dc:creator>Trond Haugen</dc:creator>
      <dc:date>2002-10-04T10:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819013#M721058</link>
      <description># cat xx.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;ans=x&lt;BR /&gt;while  `perl -e"exit '$ans'=~m/^\d{1,4}$/"` ; do&lt;BR /&gt;    echo "Gimme a number [0000]\c"&lt;BR /&gt;    ans=`line`&lt;BR /&gt;    done&lt;BR /&gt;echo "You entered a valid number: $ans"&lt;BR /&gt;# sh xx.sh&lt;BR /&gt;Gimme a number [0000]a&lt;BR /&gt;Gimme a number [0000]12345&lt;BR /&gt;Gimme a number [0000]99&lt;BR /&gt;You entered a valid number: 99&lt;BR /&gt;#</description>
      <pubDate>Fri, 04 Oct 2002 10:35:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819013#M721058</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-04T10:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819014#M721059</link>
      <description>Without perl :&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;while [ true ] ; do&lt;BR /&gt;unset ans&lt;BR /&gt;echo "Gimme a number [0000]\c" &lt;BR /&gt;ans=`line` &lt;BR /&gt;anslen=` echo $ans | wc -c `&lt;BR /&gt;# echo "ans " $ans $anslen&lt;BR /&gt;if [ $anslen -gt 1   -a  $anslen  -lt 6  ]; then&lt;BR /&gt;        break&lt;BR /&gt;fi&lt;BR /&gt;done &lt;BR /&gt;echo "You entered a valid number: $ans" &lt;BR /&gt;&lt;BR /&gt;Gimme a number [0000]&lt;BR /&gt;Gimme a number [0000]12345&lt;BR /&gt;Gimme a number [0000]123&lt;BR /&gt;You entered a valid number: 123&lt;BR /&gt;&lt;BR /&gt;As this is for up to 4 digits or alphabets&lt;BR /&gt;&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Fri, 04 Oct 2002 11:39:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819014#M721059</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2002-10-04T11:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819015#M721060</link>
      <description>It's perl time!&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Fri, 04 Oct 2002 11:49:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819015#M721060</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-04T11:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819016#M721061</link>
      <description>You can not grab a spefic amount of characters in any of the standard shells (borne, korn, csh, tcsh, bash, bash2, etc...).&lt;BR /&gt;&lt;BR /&gt;You need to either write your own little C code (very short code) or use perl (shorter code)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Fri, 04 Oct 2002 12:12:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819016#M721061</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-10-04T12:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819017#M721062</link>
      <description>Unfortunately POSIX Shell is not as all-singing and all-dancing as other structured programming languages.&lt;BR /&gt;&lt;BR /&gt;Best lower your expectations rather than spend ages working around them!&lt;BR /&gt;&lt;BR /&gt;Share and Enjoy! Ian</description>
      <pubDate>Fri, 04 Oct 2002 12:12:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819017#M721062</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2002-10-04T12:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819018#M721063</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Here's another way, using shell features:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "enter a number"&lt;BR /&gt;read X&lt;BR /&gt;if [ -z "$X" -o `expr length "$X"` -gt 4 -o `expr "$X" : '[0-9,\-]*'` -ne `expr &lt;BR /&gt;"$X" : '.*'` ]&lt;BR /&gt;then&lt;BR /&gt;  echo "not a valid number!" &lt;BR /&gt;else &lt;BR /&gt;  echo "ok, it's a good number!" &lt;BR /&gt;fi &lt;BR /&gt;exit 0 &lt;BR /&gt;&lt;BR /&gt;The above piece of code will verify that the input read isn't null; consists only of the digits 0-9; and is only one to four digits in size.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 04 Oct 2002 12:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819018#M721063</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-10-04T12:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819019#M721064</link>
      <description>Thank you for posting up the sample source codes on handling the standard input. Thanks a lot. But i had the problem which i will show below:&lt;BR /&gt;&lt;BR /&gt;1st example,&lt;BR /&gt;Enter a number: [____] (4 numbers)&lt;BR /&gt;&lt;BR /&gt;2nd example,&lt;BR /&gt;Enter a number: [1234] &lt;BR /&gt;&lt;BR /&gt;3rd example,&lt;BR /&gt;Enter a number: [12345 (the bracket is overwritten)&lt;BR /&gt;&lt;BR /&gt;4th example if i backspace,&lt;BR /&gt;Enter a number: [1234 (the bracket is lost)&lt;BR /&gt;&lt;BR /&gt;How to maintain the 4 digit to be entered to the system? Only allowed 4 and not more than that. If i press additional key&lt;BR /&gt;&lt;BR /&gt;5th example,&lt;BR /&gt;Enter a number: [1234]&lt;BR /&gt;&lt;BR /&gt;--if i press 8&lt;BR /&gt;&lt;BR /&gt;6th example,&lt;BR /&gt;Enter a number: [1238]&lt;BR /&gt;&lt;BR /&gt;As you can see the bracket is not overwritten and the user can only enter 4 numbers only. Any idea on this? Can bourne shell do something like this? Thanks for your posting and your help.</description>
      <pubDate>Fri, 04 Oct 2002 16:08:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819019#M721064</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-04T16:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819020#M721065</link>
      <description>Oops...i forget to read the messages properly. &lt;BR /&gt;&lt;BR /&gt;To Shannon Perty&lt;BR /&gt;-----------------&lt;BR /&gt;You can not grab a spefic amount of characters in any of the standard shells (borne, korn, csh, tcsh, bash, bash2, etc...). &lt;BR /&gt;You need to either write your own little C code (very short code) or use perl (shorter code) &lt;BR /&gt;&lt;BR /&gt;Can you show me an example of c or perl code that enable to grab a specific amount of characters? If i write something in C or Perl, can i integrate that script into my bourne shell application.&lt;BR /&gt;&lt;BR /&gt;Ian Denisson&lt;BR /&gt;-------------&lt;BR /&gt;Thank you for your advice and i will try to bear that in mind. &lt;BR /&gt;&lt;BR /&gt;Anyway thanks for everyones help.</description>
      <pubDate>Fri, 04 Oct 2002 20:33:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819020#M721065</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-04T20:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819021#M721066</link>
      <description>Really no solutions? Anyway thanks for your help.</description>
      <pubDate>Sun, 06 Oct 2002 09:04:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819021#M721066</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-06T09:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819022#M721067</link>
      <description>What's wrong with my answer? It is easy to tweak it to stay within the brackets.&lt;BR /&gt;&lt;BR /&gt;Jean-Luc copies my answer - removes the perl part - and gets five point, though we still don't know what is wrong with either.</description>
      <pubDate>Sun, 06 Oct 2002 15:10:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819022#M721067</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-06T15:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819023#M721068</link>
      <description>Dear procura, i had tried your sample code but it only displays:&lt;BR /&gt;Standard Output&lt;BR /&gt;---------------&lt;BR /&gt;Gimme a number [0000]1234&lt;BR /&gt;Gimme a number [0000]12345&lt;BR /&gt;Gimme a number [0000]12&lt;BR /&gt;..&lt;BR /&gt;keep looping&lt;BR /&gt;(i did not see the message You entered a valid number ...)&lt;BR /&gt;Did you miss out anything?&lt;BR /&gt;&lt;BR /&gt;But what i want is:&lt;BR /&gt;&lt;BR /&gt;Gimme a number [0000] -&amp;gt; 4 numbers only&lt;BR /&gt;Gimme a number [12  ] -&amp;gt; i enter 12&lt;BR /&gt;Gimme a number [0123] -&amp;gt; i enter 123&lt;BR /&gt;Gimme a number [1234] -&amp;gt; i enter 1234&lt;BR /&gt;Gimme a number [1235] -&amp;gt; i enter 12345&lt;BR /&gt;&lt;BR /&gt;(i want to enter my input inside the bracket rather than outside the bracket, i know how to position the cursor, but if i enter more than 4 numbers, it overwrite the ])&lt;BR /&gt;&lt;BR /&gt;Base on you reply, It is easy to tweak it to stay within the brackets? Can you explain to me clearly please. Maybe some sample codes. I don't understand your explanation earlier. Anyway thanks for replying. Sorry for the marks.</description>
      <pubDate>Sun, 06 Oct 2002 16:08:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819023#M721068</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-06T16:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819024#M721069</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;if you really want to do this in "shell" then you'll have to use something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/'sh&lt;BR /&gt;# read a 4-digit number from stdin&lt;BR /&gt;&lt;BR /&gt;digit() {&lt;BR /&gt;d=$(dd bs=1 count=1 2&amp;gt;/dev/null)&lt;BR /&gt;echo $d&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;old=$(stty -g)&lt;BR /&gt;stty raw -echo -echoe -echok&lt;BR /&gt;number="xxxx"&lt;BR /&gt;while [ "$number" -lt "0000" -o "$number" -gt "9999" ]; do&lt;BR /&gt;echo "Enter number: \c"&lt;BR /&gt;d1=$(dd bs=1 count=1 2&amp;gt;/dev/null); echo "$d1\c"&lt;BR /&gt;d2=$(dd bs=1 count=1 2&amp;gt;/dev/null); echo "$d2\c"&lt;BR /&gt;d3=$(dd bs=1 count=1 2&amp;gt;/dev/null); echo "$d3\c"&lt;BR /&gt;d4=$(dd bs=1 count=1 2&amp;gt;/dev/null); echo "$d4"&lt;BR /&gt;number="$d1$d2$d3$d4"&lt;BR /&gt;done&lt;BR /&gt;stty $old&lt;BR /&gt;echo "Your number is $number"&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Wodisch&lt;BR /&gt;</description>
      <pubDate>Sun, 06 Oct 2002 19:52:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819024#M721069</guid>
      <dc:creator>Wodisch</dc:creator>
      <dc:date>2002-10-06T19:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819025#M721070</link>
      <description>Dear Wodish, when i run your script i saw an error:&lt;BR /&gt;Stout&lt;BR /&gt;-----&lt;BR /&gt;script interpreter "/usr/bin/'sh" not found&lt;BR /&gt;Script intepreter "/usr/bin/'sh" not found&lt;BR /&gt;sh: readnumber.sh not found&lt;BR /&gt;(i name your script into readnumber.sh)&lt;BR /&gt;&lt;BR /&gt;So i remove the ' to become /usr/bin/sh &lt;BR /&gt;Is it okay to remove it. I think it shouldn't be a problem.&lt;BR /&gt;&lt;BR /&gt;But after i run again your script i saw this error:&lt;BR /&gt;stout&lt;BR /&gt;-----&lt;BR /&gt;readnumber.sh[12]: xxxx: The specified number is not valid for this command.&lt;BR /&gt;Your number is xxxx&lt;BR /&gt;&lt;BR /&gt;I analyze your script i notice that can i really compare xxxx with numbers. So i try to change number=1234 or number=11111. But it did not go through the loop. &lt;BR /&gt;Can you really run this script properly in unix as i am using HP-UX 10.20? Thank you for your help.</description>
      <pubDate>Sun, 06 Oct 2002 23:13:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819025#M721070</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-06T23:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819026#M721071</link>
      <description>Dear Wodisch, The script can work already as i assign number=-1. But i do not understand why you assign number="xxxx"? But i feel there is some problem right here with the standard output.&lt;BR /&gt;&lt;BR /&gt;Stout&lt;BR /&gt;-----&lt;BR /&gt;Enter number : 1234 (after enter 4 automatic display)&lt;BR /&gt;Your number is 1234&lt;BR /&gt;&lt;BR /&gt;But in between the first message and 2nd message there are a lot of spaces.&lt;BR /&gt;&lt;BR /&gt;Stout&lt;BR /&gt;------&lt;BR /&gt;Enter number : 1234 (spaces) -line 1 - Message 1&lt;BR /&gt;(spaces) Your number is 1234 - line 2 - Message 2&lt;BR /&gt;&lt;BR /&gt;1) Can i remove all this spaces so that when i display my result the message 2 will be on the left side. &lt;BR /&gt;Expected stout&lt;BR /&gt;--------------&lt;BR /&gt;Enter number : 1234 &lt;BR /&gt;Your number is 1234&lt;BR /&gt;&lt;BR /&gt;2) When i just press 4 it just automatic display the message 2? Can i pause it before i display the message 2? Example&lt;BR /&gt;&lt;BR /&gt;Expected stout&lt;BR /&gt;---------------&lt;BR /&gt;Enter number : 1234 (cursor blinking in 4 except i press enter to move to message 2)&lt;BR /&gt;Enter number : 1235 (if i enter 5 it will replace 4, i feel like this looks more realistic).&lt;BR /&gt;&lt;BR /&gt;3) What does this command means?&lt;BR /&gt;a. stty raw -echo -echoe -echok&lt;BR /&gt;b. stty -g&lt;BR /&gt;&lt;BR /&gt;As i know stty -echo is to hide the input that you enter. What is raw and -echoe and -echok for? stty -g is for what purposes?&lt;BR /&gt;&lt;BR /&gt;Anyway thanks for your help Wodisch. It really help me a lot.</description>
      <pubDate>Sun, 06 Oct 2002 23:32:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819026#M721071</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-06T23:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819027#M721072</link>
      <description>Dear Wodisch, i see errors when i press the backspace, space bar and enter key. Examples:&lt;BR /&gt;&lt;BR /&gt;Example 1 (stout)&lt;BR /&gt;-----------------&lt;BR /&gt;Enter number : 12 + (2 spaces)&lt;BR /&gt;Your number is 12&lt;BR /&gt;&lt;BR /&gt;(can i type 12 and press enter to display the second message)&lt;BR /&gt;&lt;BR /&gt;Example 2 (stout)&lt;BR /&gt;-----------------&lt;BR /&gt;Enter number : 12 + (2 enters)&lt;BR /&gt;Your number is 12&lt;BR /&gt;&lt;BR /&gt;(can i only press 1 enter rather than 2 times to see message 2)&lt;BR /&gt;&lt;BR /&gt;Example 3 (stdout)&lt;BR /&gt;------------------&lt;BR /&gt;Enter number 12 + (2 backspaces)&lt;BR /&gt;readnumber.sh[12]: 12^H^H: Syntax error&lt;BR /&gt;Your number is 12&lt;BR /&gt;&lt;BR /&gt;(can i press backspaces if i key in the wrong number to modify the new value, but still limits to 4 characters)&lt;BR /&gt;&lt;BR /&gt;Before:&lt;BR /&gt;Enter number : 132&lt;BR /&gt;--after backspace 2 times&lt;BR /&gt;After:&lt;BR /&gt;Enter number : 122 (new value)&lt;BR /&gt;&lt;BR /&gt;Example 4 (stdout)&lt;BR /&gt;------------------&lt;BR /&gt;Enter number : (4 backspaces)&lt;BR /&gt;The cursor is below character r&lt;BR /&gt;readnumber.sh[12]: ^H^H^H^H: Syntax error&lt;BR /&gt;&lt;BR /&gt;(Is it possible if i press backspace without entering any characters, it will not move back and erase my 1st message)&lt;BR /&gt;&lt;BR /&gt;Before:&lt;BR /&gt;Enter number : _ (_ = cursor)&lt;BR /&gt;--after press backspace&lt;BR /&gt;After:&lt;BR /&gt;Enter number : _ (still at the same &lt;BR /&gt;&lt;BR /&gt;It sound confusing here but i do not know whether bourne shell programming can do that or not? Any bourne shell sample codes to aid me thank you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Oct 2002 03:55:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819027#M721072</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-07T03:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819028#M721073</link>
      <description>No other solutions? Is it really that bourne shell does not have the capabilities to do that. Anyway thank you.</description>
      <pubDate>Sun, 13 Oct 2002 15:57:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819028#M721073</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-13T15:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819029#M721074</link>
      <description>The bourne shell ain't no glossy programming environment :) It's the most basic interface the user has to the system.&lt;BR /&gt;&lt;BR /&gt;You *do* have to use C/perl/... to get into more shiny processing, and use libraries or modules to do extensive user interaction. C can be used to build user interfaces that adopt to X11, Motif, KDE, Qt, or any `standard' or well documented graphic frontend. Perl has a wide range of modules that interface to standard graphic environmets, like Perl/Tk and Perl/Gtk.</description>
      <pubDate>Sun, 13 Oct 2002 16:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819029#M721074</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-10-13T16:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Bourne Shell Programming Input and Output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819030#M721075</link>
      <description>The problem here is my org unix does not have perl/tk and have an old perl interpreter 4.0. I had some problems whether C can work well with bourne/Posix scripting? Is there any C and Bourne/Posix sample scripts (both integrated) to do the processing? Thank you.</description>
      <pubDate>Sun, 13 Oct 2002 23:25:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/bourne-shell-programming-input-and-output/m-p/2819030#M721075</guid>
      <dc:creator>Chua Wen Ching</dc:creator>
      <dc:date>2002-10-13T23:25:22Z</dc:date>
    </item>
  </channel>
</rss>

