Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-07-2004, 03:01 AM   #1
Registered: Nov 2004
Distribution: RedHat
Posts: 37

Rep: Reputation: 15
shell script interaction

Hi everyone,
I want to configure the PPPoE protocal. There are the command adsl-setup,adsl-connect,adsl-start & adsl-stop are there. My question is when i activate the adsl-setup
command it ask the username and interface and etc....
Is it possible to write a shell script to activate the 'adsl-setup' and give the information about what time it ask such as usrname and interface and DNS details from the "file". That file is i already edited and store the details in,
eth0 etc...,

Is there any shell command is there for interacting the shell script at run time.
Old 12-08-2004, 03:34 PM   #2
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Fedora Core 8-10
Posts: 61

Rep: Reputation: 15

I'm not sure what you need to pass to your script, but you have a couple of options.

The first is to pass variable values in when you invoke your script, just like you do with commands like cp, rm, etc.
Eg myscript var1 var2 ...
The value of var1 will be held in a variable called $1, var2 in $2 ... (I'm sure you see the pattern arising)

The second is to get the script to call for them and input them as required, eg
>Please enter the value of var1:


You achieve this by scripting

set var1 = $</

This sets the value of var1 to "the_value".

I got this from checking up in "Linux programmers reference", and the particular syntax is for the tcsh shell, but the others are all pretty similar.

Good luck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script inside shell script treotan Linux - General 4 02-19-2009 06:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Interaction in shell script sudhasmyle Programming 1 12-08-2004 07:27 AM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 03:00 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration