Jump to content

Bash scripts automatic input


Recommended Posts

Hi

 

I have a command-line login program for an in-house university system. Say the program is called "foo". I run foo from the command-line

 

./foo

 

Then it asks for a user-name and password. Is there anyway I can write a bash script say "bar" that runs foo and automatically puts in the required user-name and password? Yes, yes I know the security risks as I'll likely have to put the user-name and password in a plain text file, but everything is passed to the server in plain text anyway so security is already practically non-existent (and this assumes that the server is up and running - god it sucks). I have to log in every day and it gets annoying having to type in my username and password several times a day.

Edited by Uiler
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...