• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Migrating batch files to shell scripts

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I have an application running on windows,which uses batch files.Now planned to move it onto unix/linux platform and so had be converting the batch scripts onto shell scripts for the same.
Now the windows scripts have few commands where in it connects to another machine and i have commands to access it like 'net use' from windows.

How to achieve the same using UNIX/LINUX ?

Any help highly appreciated.

Thanks
 
Saloon Keeper
Posts: 26047
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the case of Unix machines using Windows Networking, the product to use is Samba. There's not a 1-for-1 command translation, however, since Windows and Unix have different ways of looking at the universe.

For a permanent connection, you can use the smbmount facility to map a location globally. For example, I could set up an automatic mount to \\mywinfs\share1 to be mounted at /winshare. Note, BTW, that in Samba, that would be "//mywinfs/share1" so that the backslashes wouldn't be confused with escape characters.

For a less permanent connection (such as user-specific shares), you can do an automount. I've no experience with that one, though.

For one-shot file transfers, use the smbclient utility like it was ftp. Or, for copying whole directories into/from tar files (e.g. for backups) there's a handy little utility called smbtar.

For sharing out a part of your Unix machine to Windows users, you have to install the samba server and define the shares in the samba.conf file.
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic