Dealing with options , Shell scripting :

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ajd335
    New Member
    • Apr 2008
    • 123

    Dealing with options , Shell scripting :

    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
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    I am not clear with your requirement.
    Do u want to use the previously enetered values or u need something else?

    Raghu

    Comment

    • ashitpro
      Recognized Expert Contributor
      • Aug 2007
      • 542

      #3
      Originally posted by ajd335
      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
      I've always suggested to use "expect" utility to automate the things in shell script...

      Comment

      • ajd335
        New Member
        • Apr 2008
        • 123

        #4
        Originally posted by gpraghuram
        I am not clear with your requirement.
        Do u want to use the previously enetered values or u need something else?

        Raghu
        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...

        Comment

        • ajd335
          New Member
          • Apr 2008
          • 123

          #5
          Originally posted by ashitpro
          I've always suggested to use "expect" utility to automate the things in shell script...
          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.

          Comment

          • ajd335
            New Member
            • Apr 2008
            • 123

            #6
            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............

            Comment

            • gpraghuram
              Recognized Expert Top Contributor
              • Mar 2007
              • 1275

              #7
              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

              Comment

              • ajd335
                New Member
                • Apr 2008
                • 123

                #8
                Originally posted by gpraghuram
                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
                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..

                Comment

                Working...