- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problems with backslashes in script being tran...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 06:57 AM
тАО09-07-2004 06:57 AM
Problems with backslashes in script being translated incorrectly
I have a user that created ftp scripts two years ago to access a win2k ftp server -- all of a sudden this "broke" and although I could not see OS changes, etc. that would cause this, I'm not really comfortable in expecting these to work as expected.
The backslashes are used like this :
MYDIR=\\\\dir1\\\\dir2\\\\
Does anyone use these in scripts? I did tell the user to just use forward slashes, but they are reluctant to change anything that has worked for 2 years. Plus, I haven't found a lot of information about using backslashes in such a manner... I was hoping either that someone would have experience (either positive or negative) or other tricks & information so that I can firmly recommend my proposed changes to the script. I looked for quite some time but did not see much information about the subject.
Thanks!!!
- Tags:
- quoting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 07:16 AM
тАО09-07-2004 07:16 AM
Re: Problems with backslashes in script being translated incorrectly
instead of MYDIR=\\\\dir1\\\\dir2\\\\
Does it give any error??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 07:30 AM
тАО09-07-2004 07:30 AM
Re: Problems with backslashes in script being translated incorrectly
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 07:31 AM
тАО09-07-2004 07:31 AM
Re: Problems with backslashes in script being translated incorrectly
ftp -i -n <<-%% > $OUTFILE 2>&1
open $SERVER
user $USERID $PASSWD
$TYPE
cd $REMOTEDIR
$CMD $ARG1 $ARG2
bye
%%
Basically, they're saying $REMOTEDIR=\\\\dir1\\\\dir2\\\\
and calling the ftp script this way...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 07:47 AM
тАО09-07-2004 07:47 AM
Re: Problems with backslashes in script being translated incorrectly
"dir1dir2myfile.csv: The system cannot find the file specified."
Note, this problem is run by a batch system named locally as "maestro" which is actually a tivoli product (Tivoli Scheduler?). The script will run fine manually... which seems really strange.
I already forwarded this to the people that support the batch scheduling software, but they did not find anything conclusive. I was hoping that maybe someone would have had problems with using the backslash (or maybe tell me that this is pretty solid and have ideas for something else that I can look for)... I have looked through ftp client, kernel changes, etc. for anything that has changed since the last successful run of this script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-07-2004 07:54 AM
тАО09-07-2004 07:54 AM
Re: Problems with backslashes in script being translated incorrectly
which shell do you use while executing this script from the command line ?
Edit the script and explicitly define the shell to use in the first line
#!/usr/bin/sh
and try again from the scheduler.
Consider defining REMOTEDIR as
REMOTEDIR="c:\dir1\dir2"