Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

returning a pathname from a function



Zsh hackers,
    I am attempting to return a path name from the following function.

prep_directories()
{
   output_directory="/var/adm/backup/${1}_${2}"
   backup_log="${output_directory}/backup.log"
   backup_lis="${output_directory}/backup.lis"
   return $backup_log,$backup_lis
}

prep_directories 20000330 WEEKLY


Executing this script results in the following error.

    prep_directories: bad math expression: unbalanced stack [75]

I assume it has something to do with the slashes (/) found in the string
that it is attempting to return.

Any and all suggestions will be greatly appreciated.

Thanks,

Allen Belk

 | Allen Belk, Systems Manager
 | Office of Technology Resources
 | University of Southern Mississippi
 | allen.belk@xxxxxxx  601.266.6013





Messages sorted by: Reverse Date, Date, Thread, Author