![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
|
Basic I/O
How do you ask for user input in BaSH?
I was wondering because I am trying to make a file sorter for myself, and I want the script to ask the user what directory that it want's me to sort.
__________________
And there was much rejoicing... Yay.... |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4
![]() |
echo -n "Enter directory name " read DIRECTORY echo "Sorting $DIRECTORY..." |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
Thanks, that's what I needed!
__________________
And there was much rejoicing... Yay.... |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
__________________
"I'm not a genius. Why do I have to suffer?" |
|
|
|
|
|
#5 |
|
Programming Guru
![]() ![]() ![]() |
hah, the real joy is throwing in some parameters...
$ ls -lastr | sort ![]()
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|