![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Red hat --- hyper term? | Rivers1980 | UNIX for Dummies Questions & Answers | 1 | 12-06-2007 03:12 PM |
| Search term and output term in desired field | Raynon | Shell Programming and Scripting | 28 | 03-03-2007 11:34 PM |
| Create a Term & Run chars on this Term | the_tical | High Level Programming | 1 | 08-12-2003 06:18 PM |
| X-Term for Windows | yelamarthi | UNIX for Dummies Questions & Answers | 5 | 10-23-2002 02:20 PM |
| Setting TERM variable | DPAI | UNIX for Dummies Questions & Answers | 1 | 08-16-2001 10:24 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to amend an existing TERM script to prompt the end user for a password - then take that password and add it to a specific part of an existing file.
Here is what I have - BUT - I am confusing Unix with Term and my script does not like what I added b/c the script simply runs through and returns the user to a $. (Notice that the password is added in the second from the last line) - Can anyone help me translate this shell script to TERM?? - Thanks in Advance!!! echo "Changing Password for All Medicare Scripts" echo "Password MUST be 8 characters in length" echo "MUST contain BOTH letters and numbers (any combo totaling 8)" echo "Password MUST be entered in lower case (NO Capital Letters)" echo "Password CANNOT be the LoginID (PRJ Number)" echo "MUST be changed periodically (30/60/90 Days is preferred)" echo "Enter New Password Request:" read newpswd rm /usr/term/pa08fps.old cp /usr/term/pa08fps.con /usr/term/pa08fps.old rm /usr/term/pa08fps.con > /usr/term/pa08fps.con echo "xprot ZMODEM" >> /usr/term/pa08fps.con echo "set view on" >> /usr/term/pa08fps.con echo "set echo on" >> /usr/term/pa08fps.con echo "!dinit \"AT&FV1E0M1Q0S7=60\\r\"" >> /usr/term/pa08fps.con echo "login \"^SN:^Slogin\r^SD:^S$newpswd\\r\"" echo "capture disk /dev/null overwrite" >> /usr/term/pa08fps.con |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
I don't know term, but I know shell scripts. I think you have an error, where you forgot to save the login/password information:
echo "login \"^SN:^Slogin\r^SD:^S$newpswd\\r\"" >> /usr/term/pa08fps.con Also, to clean your script up, rather than doing the rm-cp-rm-createfile shuffle, just do this: cp /usr/term/pa08fps.con /usr/term/pa08fps.old echo "xprot ZMODEM" > /usr/term/pa08fps.con # notice the single > # The rest of your echo statements will use >> Now, the last thing is: by the end of this script you have created a file. What do you want to do with it? Since you don't say, your users will get their $ after running this script. You have to do something with your /usr/term/pa08fps.con. Perhaps, term /usr/term/pa08fps.con ...or something like command /usr/term/pa08fps.con |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|