473,508 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dealing with options , Shell scripting :

123 New Member
Hi all,
I am a newbie in shell scripting..
I am writing a code to automate the installation of some softwares.
It includes some of the question during installation where we need to choose from that. How can I automate that part.
e.g if the screen size menu pops up, my script should select the maximized option always and thus fully automating the installation
I am not quite sure if there is any method or function.

Thanks
Jan 8 '09 #1
7 2306
gpraghuram
1,275 Recognized Expert Top Contributor
I am not clear with your requirement.
Do u want to use the previously enetered values or u need something else?

Raghu
Jan 8 '09 #2
ashitpro
542 Recognized Expert Contributor
@ajd335
I've always suggested to use "expect" utility to automate the things in shell script...
Jan 8 '09 #3
ajd335
123 New Member
@gpraghuram
Hi Raghuram,
I already have the desired value for the options to be checked and not to be checked. E.g If window size option pops up , I always wanted to select maximize from that.( i.e Window size option will have 2 values only maximized and minimized . Further I have the information regarding all option : all the options with their sequence. )
So I just need to have some way so that I can automate the process giving the desired value for each options.
( You can think above as e.g you are installing a software for the 3rd time, so you know which option will pop up after which and what will be the options and what you want to select).....

Thanks...
Jan 8 '09 #4
ajd335
123 New Member
@ashitpro
Hi,
Thanks for the suggestion.
I searched on Google about Expect. Found very helpful.
Actually my OS installation ask me various questions.
When I ran a command to install one utility, it will pop up a window having different values and have check boxes to select them.
I have decided on the options I wanted to check.
Can you please tell me how can I do so.

E.g The mail/postfix utility will popup a window having several check and unchecked boxes.
I want to select particular two options and uncheck one...
Can you please provide me some sample formate for doing so?
Thanks for your help.
Jan 8 '09 #5
ajd335
123 New Member
Further, is there any other way than using "expect". As I am writing a script to automatically install all the system tools and utility and thus /usr/ports/lang/expect is not installed(Infact the script is installing all the ports and so on)... So is there any other way than expect or else some way to use expect if not have the /usr/ports/lang/expect ??

Thanks for helping me up............
Jan 8 '09 #6
gpraghuram
1,275 Recognized Expert Top Contributor
So you dont want to ask the user certain inputs and automate it?
If yes then its easy right as you said you have all the values with you.

Raghu
Jan 9 '09 #7
ajd335
123 New Member
@gpraghuram
Hi Raghu,
Yes I am aware of what questions will be there and the answers . But, how to so so. I cannot use EXPECT , because my script is going to install /usr/ports. I am not aware of the function or the utility which can help me in this. Can you please tell me what can be done ?

Thanks for the help..
Jan 9 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1622
by: Tom Willis | last post by:
How are the expert pythoneers dealing with config files? Is there anything similair to .net's config files or java's .properties? A quick search on google didn't return anything that looked...
7
2663
by: Oliver Gräser | last post by:
Hej, I want to run batchfiles via the Shell, but accessible in the Browser via IIS. Actually, I'd like the server to start a command line ntbackup if a users selects to do so on an ASP in his...
2
12174
by: rcmail14872 | last post by:
I have seen some very general suggestions for alternative code to the WScript.Shell code, but nothing specific. In the two lines of code below (I think) the first line creates a text file on the...
5
2254
by: Javaman59 | last post by:
Hi all, I'm a Unix guy from way back, who's enjoying learning C# and Windows programming. Overall, it's not such a difficult transition (as long as one keeps an open mind :) ), but there is one...
10
2252
by: A.M | last post by:
Hi, I am having difficulty with shell scripting in Python. I use the following command to run a DOS command and put the return value in a Python variable:
6
8461
by: Sanket80 | last post by:
Hi, I have one shell script which runs a report and sends the output to user. The shell script has some queries written in it in SQL and hence when I execute a shell script via a concurrent...
7
2228
by: Frank Potter | last post by:
I learned some python in windows. And now I've turned to linux. I read a book and it teaches how to write shell script with bash, but I don't feel like the grammar of bash. Since I know about...
14
4869
keyvanrahmadi
by: keyvanrahmadi | last post by:
Sorry if this post is rather long but hopefully you wont get bored half way through. I have a project in hand which i have started and have a deadline of 1 week. Basically what i need to do is to...
0
9932
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.