LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-05-2012, 10:53 PM   #1
200mg
Member
 
Registered: Jul 2006
Posts: 88

Rep: Reputation: 15
Noob Shell script question


In Windows you can get a user provided variable with set /p, I was wondering what the linux equivalent is for set /p. variables seem to be more straight forward in shell scripting, just a=b, how can i get b to be provided by the end user based on a question, in windows it would be. TIA

set /p var="please enter var"
 
Old 01-05-2012, 11:03 PM   #2
200mg
Member
 
Registered: Jul 2006
Posts: 88

Original Poster
Rep: Reputation: 15
nvm...read command =)
 
Old 01-06-2012, 01:32 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Good job figuring it out yourself. Please mark the thread as solved.

Here are a few bash references for you though, to help you in your studies. I especially suggest taking time out to read through the BashGuide at least. It covers all the basic scripting concepts in an easy-to-read form.

http://mywiki.wooledge.org/BashGuide
http://www.linuxcommand.org/index.php
http://mywiki.wooledge.org/BashFAQ
http://mywiki.wooledge.org/BashPitfalls
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/index.html
http://www.gnu.org/software/bash/manual/bashref.html
http://wiki.bash-hackers.org/start
http://ss64.com/bash/
 
1 members found this post helpful.
  


Reply



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
[SOLVED] Script question: Shell script in kde to log in on a server with ssh c4719929 Programming 18 01-31-2011 09:26 AM
[SOLVED] Script question: create a shell script in kde to log in on a server with ssh c4719929 Linux - Newbie 1 01-31-2011 03:05 AM
Script writing question from a noob shado40 Slackware 8 02-04-2006 12:39 PM
noob bash script question babag Programming 9 04-30-2005 02:25 AM
shell script question rrwhite Linux - General 3 09-15-2004 01:01 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:45 AM.

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
Open Source Consulting | Domain Registration