![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Red hat --- hyper term? | Rivers1980 | UNIX for Dummies Questions & Answers | 1 | 12-06-2007 06:12 PM |
| Search term and output term in desired field | Raynon | Shell Programming and Scripting | 28 | 03-04-2007 02:34 AM |
| Create a Term & Run chars on this Term | the_tical | High Level Programming | 1 | 08-12-2003 10:18 PM |
| X-Term for Windows | yelamarthi | UNIX for Dummies Questions & Answers | 5 | 10-23-2002 06:20 PM |
| Setting TERM variable | DPAI | UNIX for Dummies Questions & Answers | 1 | 08-17-2001 02:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|