If an instance contains CPU, I want to grab the instance name, so I can execute the wbemcli command again to get specific property values.
The problem that I have is that the "http://..." string must be enclosed in single quotes. I have created variables in the script that will would replace the <username>, <password>, <host>, and <targetpc>, but from what I have read so far is that single quotes do no allow variable substitution.
I am not a complete noob to linux/unix, but I have never written something this complex previously. Any help would be greatly appreciated.
You can start and stop the quotes whenever you want without chopping up the resulting string. (Unless any of the variables contain spaces, in which case it will still get chopped up.)
You can also try double quotes, which do allow substitution, and won't ever chop up the string:
If there's things in your URL which do funny things in double quotes, you can escape them with \ so they're interpreted literally.
Last edited by Corona688; 06-16-2011 at 02:04 PM..
HI Everyone,
I have TL1 script which takes the temperature of a CISCO equipment through TELNET now i need to save the output of the command to a csv file .
Like this is the output
> RTRV-SHELFSTAT:AB1S2a::1;
AB1S2a 2016-02-03 22:29:39
M 1 COMPLD
... (2 Replies)
Sir I want to practice SCO_Unix so I want to install SCO_UnixWare7.1.4 on virtualbox so can you please suggest the procedure how to install it on virtualbox. My host Operating System is OpenSuse12.3. I am unable to run VmWare on my OS so please suggest how to install on virtualbox only.
... (0 Replies)
Hi,
balajesuri and durden_tyler, I have found your perl script for the thread https://www.unix.com/shell-programming-scripting/176370-perl-script-help-me-extracting-string.html, but find it difficult to understand the syntax.
Could you or any forum members kindly shed some light on the logic... (3 Replies)
Discussion started by: royalibrahim
3 Replies
4. Post Here to Contact Site Administrators and Moderators
Hi admins and moderators!!
Happy new year and merry Christmas :D
Well, I have been here a few months now as a registered member and may be 6-7 years that I got numerous help directly and indirectly from this site as a guest.
Unix.com really has a vast collection of posts on wide variety of... (15 Replies)
Hello every1,
I need help to replace a string in a file by my bash script.
Find: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n= %d %5p (%F:%L) - %m%n
Replace: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n
I tried by sed, but kept... (7 Replies)
hi guys linux noob here wanting to learn linux scripting, i need help with a backup script that not only allows me to back up my files but restore them to my own personal directory, had a look at some of the coding from the scripts section on this site but still lost.
any help is much appreciated (8 Replies)