473,566 Members | 2,785 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 2313
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(Infac t 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
1625
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 useful, and I almost would expect to see some module that would be for dealing with config information. I can think of at least one way to do it,...
7
2666
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 webbrowser. Does anyone know how to create a shell object in an ASP? Thanks,
2
12188
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 hard drive. When I get to this line I get runtime error 429 "ActiveX component can't create object". I know I should not use WSH but I haven't been...
5
2255
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 thing from Unix I miss the most - the command line. I've install a Unix like programming environment, call MSys, which let's me do command line...
10
2257
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
8466
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 programme, I need to ensure that shell script connects to Oracle Database to execute the SQL written inside it. Now when I hard code the shell script with...
7
2234
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 python, I want to get a linux shell which use python grammar. I searched by google and I found pysh, which is not maintained any more. There's...
14
4876
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 create a shell script in Bash for the game Hangman. I am sure everyone is well aware of the game. The down side is that i can not use "sed" or "awk". FUN...
0
9938
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 on my Windows PC? Ans: Other than Sysinternals Autoruns, there are only a few programs which are good enough to be used when dealing with autoruns....
0
7666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8108
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7951
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.