LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-31-2014, 07:17 AM   #1
biysu01
LQ Newbie
 
Registered: Oct 2014
Posts: 1

Rep: Reputation: Disabled
How to provide runtime arguments in the pop ups?


Hi All,

I very new to shell scripting so need help on the following.

SCenario:

I`m developing a automation script which as to restrat one of my servers. for that I`m writing a shell script.While stopping the server
it will prompt the user for the credentials for a double check.

Is there any way we can detect this and provide the credentials.

Thanks in Advance
Surender
 
Old 10-31-2014, 02:27 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 5,831
Blog Entries: 12

Rep: Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009Reputation: 2009
Scripts can be written to prompt for information and then you can use select or other methods to determine what was entered by a user. It depends whether you're using BASH or some other scripting language to determine what the exact syntax would be.

Here are some BASH references:

Bash Guide for Beginners
Advanced Bash Scripting Guide
Bash Scripting for Dummies and Geniuses

What you should do is start a script, try some choices to get things going and then post further questions when you get stuck. The way the forum best works is if someone puts forth honest attempts at doing something, then they usually can get all the help they ask for. Remember that forum posters are doing this on their own time, not for pay, not as part of their job or anything. Another thing to consider is what you mentioned, that you are new to writing scripts. People are not here to write scripts for you, if you wish to have someone write a script for you then the forum is the incorrect place to visit for that kind of assistance. If you've never written any script before, then you should read the beginner's guide and get familiar with writing scripts in the first place, there are examples. This way when you do try something and post it, and people then respond with suggestions, you'll be able to cope with understanding things.

Also not sure what you mean by wanting to use pop-ups. Whether that's a requirement or if you just want a banner of information to be sent like people see when they login to systems sometimes.

Last edited by rtmistler; 10-31-2014 at 02:44 PM.
 
Old 10-31-2014, 02:36 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,150

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
if you want pop-ups look into zenity.
 
Old 10-31-2014, 02:42 PM   #4
Habitual
LQ 5k Club
 
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,573
Blog Entries: 15

Rep: Reputation: Disabled
or use OSD?
Code:
notify-send "LQRocks!"
zenity|yad|dialog...
 
1 members found this post helpful.
  


Reply


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
How to provide password for pppd at runtime deepalalla Linux - Networking 0 12-29-2004 05:33 AM
#ifdefs versus runtime arguments Dark_Helmet Programming 5 09-28-2004 12:52 AM
pop ups brokenflea Slackware 1 03-25-2004 03:52 PM
Pop ups mylo2003 General 10 09-12-2003 04:37 PM
pop ups popcorn5714 Linux - Software 3 03-04-2003 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:12 PM.

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