Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Shell Script using smbclient

  • 23-09-2008 2:33pm
    #1
    Registered Users, Registered Users 2 Posts: 1,048 ✭✭✭


    Hey all, im in the middle of creating a shell script that:-

    - creates a file named according to the system date (using mkdir `date +%d_%m_%Y`
    - copies the contents of a particular directory into that file
    - copies the now fully laden file to a windows client

    Now, I can create all the files etc and access the share via smbclient, but
    when I do the following

    smb:>lcd /location/of/new/directory
    smb:>put `date +%d_%m_%Y` or even smb:>put `%d_%m_%Y`
    i get `date does not exist

    So I guess what Im asking is, can smbclient gain access to environment variables like date etc?If so, how do I specify it within the put command?

    Cheers,
    Bob


Comments

  • Registered Users, Registered Users 2 Posts: 564 ✭✭✭fishfoodie


    date isn't an env variable, its a program. If you specify the full path to the date binary it will probably work, try 'which date' & then putting in the path returned.


Advertisement