- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting problem - quotes inside quotes
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
Forums
Discussions
Discussions
Discussions
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
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
06-24-2002 11:36 AM
06-24-2002 11:36 AM
I read the list of Objects from an OmniBack Backup, including the File System and the Description (which is enclosed in quotes), and then try to find the media for that File System.
The format of the command is
print $OBJ0 # File System spec
print $OBJ1 # Label
omnidb -session $SESSION -filesystem $OBJ0 $OBJ1 -media
This consistently comes up with 'Object not found', yet when I do a 'set -x' and drag and drop the resultant command into the shell, it works fine.
Things I have tried include,..
1. Running inside the script shell, rather than the backquote command
2. Removing the single quotes from the OBJ1 (Label) variable
(this works on the command line)
3. Putting backslashes before the quotes
4. Kicking the computer repeatedly.
Anyone else fancy a go?
Share and Enjoy! Ian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 11:42 AM
06-24-2002 11:42 AM
Re: Scripting problem - quotes inside quotes
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 11:55 AM
06-24-2002 11:55 AM
Solutionecho "omnidb -session $SESSION -filesystem $OBJ0 $OBJ1 -media" >> /tmp/cmd$$
sh /tmp/cmd$$ > log_somewhere 2>&1
rm /tmp/cmd$$
See if it works??
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 12:00 PM
06-24-2002 12:00 PM
Re: Scripting problem - quotes inside quotes
yep, tried single and double, backslash (one and two of), in just about every combination.
Sridhar,
Managed to try that just now. Thanks for the answer, it works but it feels like there is a more 'elegant' solution out there, that does not require spawning a new shell.
Thanks, Ian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 08:23 PM
06-24-2002 08:23 PM
Re: Scripting problem - quotes inside quotes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2002 09:55 PM
06-24-2002 09:55 PM
Re: Scripting problem - quotes inside quotes
print "Env \$BLAH is $ENV{BLAH}\n";
but perl also has two `operators' for strings with quotes that would make things hard to parse/read otherwise: q// (single quotes) and qq// (double quotes). Equivalent to the shell's backticks (same in perl), it offers the qx// operator and the system () command
chomp (my $pwd = `pwd`);
print q{Today is }, qx{date};
print "Today is ", scalar localtime time;
print qq{Env "\$BLAH" is '$ENV{BLAH}'\n};
so ...
Given your example, I still don't know what you want exactly, but does not seem to be that much of a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2002 09:09 AM
07-10-2002 09:09 AM
Re: Scripting problem - quotes inside quotes
You don't need the quotes to query the db - so remove them:
OBJ1=$( echo $OBJ1 | sed "s/'//g")
hdh