FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-07-2008, 04:20 PM
"Amichai Rotman"
 
Default Bash Script Help

Hello,

I am not sure if this is on or off-topic... but I didn't know where to turn...

I am looking for a way to create a directory hierarchy to alphabetize a bunch of games 9similar to the hierarchies on FTP servers:


One directory called '0-9' and 26 more directories - one for each letter in the alphabet - 27 directories in all.

I once found a way to automate it with a Bash script consisting of less than 10 lines. Something to do with a loop with a range of letters for the aphabet directories...


i am also trying to teach myself Bash scripting (as for now - I know very little) - so, if any of you sends me the script - I'll study it, as well as use it...

Thanks!
.:================================================ ====:.


Amichai Rotman

UIN#: 6401746
Registered Linux User#: 201192 [http://counter.li.org/]
Registered Ubuntu User #12851 [http://ubuntucounter.geekosophical.net]


------------------------------------------------------------------------------------------------------------

PLEASE READ: http://www.gnu.org/philosophy/no-word-attachments.html


------------------------------------------------------------------------------------------------------------

.:================================================ ====:.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-07-2008, 05:04 PM
Rashkae
 
Default Bash Script Help

Amichai Rotman wrote:
> Hello,
>
> I am not sure if this is on or off-topic... but I didn't know where to
> turn...
>
> I am looking for a way to create a directory hierarchy to alphabetize a
> bunch of games 9similar to the hierarchies on FTP servers:
>
> One directory called '0-9' and 26 more directories - one for each letter in
> the alphabet - 27 directories in all.
>

mkdir 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w
x y z

> I once found a way to automate it with a Bash script consisting of less than
> 10 lines. Something to do with a loop with a range of letters for the
> aphabet directories...
>

see 1 line above.

> i am also trying to teach myself Bash scripting (as for now - I know very
> little) - so, if any of you sends me the script - I'll study it, as well as
> use it...
>
> Thanks!

http://tldp.org/LDP/abs/html/



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-10-2008, 05:43 AM
Ulf Rompe
 
Default Bash Script Help

Am Freitag, den 07.11.2008, 13:04 -0500 schrieb Rashkae:
> > One directory called '0-9' and 26 more directories - one for each
> letter in
> > the alphabet - 27 directories in all.
> >
>
> mkdir 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z

Or just use some bash-fu:

mkdir {0..9} {a..z}

Oh, and I just notice that the "0-9" should be a single dir, thus:

mkdir 0-9 {a..z}


[x] ulf
--
Der Mensch ist immer noch der beste Computer. (John F. Kennedy)


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-10-2008, 07:50 AM
"Amichai Rotman"
 
Default Bash Script Help

Thank you very much!

I knew it must be stupidly simple.... ;-)

Thanks again!
.:================================================ ====:.

Amichai Rotman

UIN#: 6401746

Registered Linux User#: 201192 [http://counter.li.org/]
Registered Ubuntu User #12851 [http://ubuntucounter.geekosophical.net]


------------------------------------------------------------------------------------------------------------

PLEASE READ: http://www.gnu.org/philosophy/no-word-attachments.html


------------------------------------------------------------------------------------------------------------

.:================================================ ====:.



On Mon, Nov 10, 2008 at 08:43, Ulf Rompe <Ulf.Rompe@icem.com> wrote:

Am Freitag, den 07.11.2008, 13:04 -0500 schrieb Rashkae:

> > One directory called '0-9' and 26 more directories - one for each

> letter in

> > the alphabet - 27 directories in all.

> >

>

> mkdir 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z



Or just use some bash-fu:



mkdir {0..9} {a..z}



Oh, and I just notice that the "0-9" should be a single dir, thus:



mkdir 0-9 {a..z}





[x] ulf

--

Der Mensch ist immer noch der beste Computer. (John F. Kennedy)





--

ubuntu-users mailing list

ubuntu-users@lists.ubuntu.com

Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 08:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org