Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Bash / Shell Scripting (http://www.programmingforums.org/forum26.html)
-   -   Basic I/O (http://www.programmingforums.org/showthread.php?t=6306)

Cipher Oct 7th, 2005 8:59 AM

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.

jim mcnamara Oct 11th, 2005 8:55 AM

:

echo -n "Enter directory name "
read DIRECTORY
echo "Sorting $DIRECTORY..."


Cipher Oct 13th, 2005 5:18 PM

Thanks, that's what I needed!

mackenga Jul 12th, 2006 5:27 PM

...but the joy of Unix is using pipelines;

:

$ ls | sort

Infinite Recursion Jul 13th, 2006 8:55 AM

hah, the real joy is throwing in some parameters...

$ ls -lastr | sort

:)


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

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC