- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Script ISSUE
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
тАО11-15-2005 04:58 PM
тАО11-15-2005 04:58 PM
I am facing some problem on script,
i want to assign output(i.e some file) to some variable its given below, after that i want rename this filename.
gmfile=$(/opt/mqm/scripts/mqigetfn CREATE ${DIRECTORY}/ ${QNAME} ${QMANAGER})
mv gmfile xxtest.txt
but its not working pls help me on this
Solved! Go to Solution.
- Tags:
- command substitution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 05:04 PM
тАО11-15-2005 05:04 PM
Re: Script ISSUE
Have you set all required variables??
set -vx, now do gmfile=$(/opt/mqm/scripts/mqigetfn CREATE ${DIRECTORY}/ ${QNAME} ${QMANAGER})
Does complain about anything??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 05:22 PM
тАО11-15-2005 05:22 PM
Re: Script ISSUE
I set all varibales
i runned the same but its same problem file received on filesystem but not assign to variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 05:27 PM
тАО11-15-2005 05:27 PM
Re: Script ISSUE
/opt/mqm/scripts/mqigetfn CREATE ${DIRECTORY}/ ${QNAME} ${QMANAGER}
gmfile="$(/opt/mqm/scripts/mqigetfn CREATE ${DIRECTORY}/ ${QNAME} ${QMANAGER})"
echo ${gmfile}
post this information.!
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 05:50 PM
тАО11-15-2005 05:50 PM
Re: Script ISSUE
/opt/mqm/scripts/mqigetfn CREATE /usr/ ${QNAME} ${QMANAGER}
For this output is,
file will copied on filesystem /usr/
gmfile="$(/opt/mqm/scripts/mqigetfn CREATE ${DIRECTORY}/ ${QNAME} ${QMANAGER})"
echo ${gmfile}
for this output is,
null there is no output but file copied to filesystem
Actually what my problem i receive file containing ^M containing i want to remove ^M character then copied to that samefilename
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 05:59 PM
тАО11-15-2005 05:59 PM
Re: Script ISSUE
Change it as,
dos2ux filename > newfile
strings filename > newfile
It will be changed.
hth.
- Tags:
- dos2ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 06:01 PM
тАО11-15-2005 06:01 PM
Re: Script ISSUE
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=972302
If you want to change into the same file then,
perl -pi -e 's/\^M//g' filename
hth.
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 06:02 PM
тАО11-15-2005 06:02 PM
Re: Script ISSUE
my file name is hptest.txt
opt/mqm/scripts/mqigetfn CREATE /usr/ ${QNAME} ${QMANAGER
after i runned this one
/usr/hptest.txt but containing ^M character
i want to remove ^M character then filename should be /usr/hptest.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 06:03 PM
тАО11-15-2005 06:03 PM
Re: Script ISSUE
gmfile=$(/opt/mqm/scripts/mqigetfn CREATE "${DIRECTORY}/ ${QNAME} ${QMANAGER}")
echo ${gmfile}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-15-2005 06:13 PM
тАО11-15-2005 06:13 PM
Re: Script ISSUE
/opt/mqm/scripts/mqigetfn CREATE /usr/ ${QNAME} ${QMANAGER}
perl -pi -e 's/\^M//g' /usr/hptest.txt
It will do it.
hth.