Re: mail directory structures in mutt
* Abhay Pradhan <Abhay_Pradhan@xxxxxxxxxxx> [2004-07-30 18:43 +0530]:
> <******************>
> #!/usr/bin/perl
>
> $numArgs = 0;
>
> foreach (@ARGV) {
> @details = split /\//, $_;
> }
>
> foreach $token (@details) {
> $numArgs++;
> }
>
> if ($numArgs > 3){
> print "too many nested levels\n";
> exit;
> }
> else{
> system("mkdir /home/pradhan/mail/$details[0]");
> system("mkdir /home/pradhan/mail/$details[0]/$details[1]");
> system("mkdir /home/pradhan/mail/$details[0]/$details[1]/$details[2]");
> }
> <******************>
perldoc -f mkdir
What's wrong with:
#!/bin/sh
for i in "$@"; do
mkdir -p /home/pradhan/mail/"$i"
done
----------------------------------
Nicolas