- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: replace text with a symbol in a file
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
тАО04-07-2009 09:14 PM
тАО04-07-2009 09:14 PM
Now i see some text which needs to be converted to a symbol which will be used as a delimiter on excel.
Please help me out with a command or probably a script which will help do it.
Symbol i am looking for is ┬╢(paragraph).
Thanks..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 09:56 PM
тАО04-07-2009 09:56 PM
Re: replace text with a symbol in a file
90966M-CM-^Q24936M-CM-^QDRM-CM-^Q M-CM-^QTemplateM-CM-^Q M-CM-^Q0M-CM-^Q M-CM-^Q M-CM-^Q M-CM-^Q M-CM-^Q0M-CM-^QCRM-CM-^Q2859
M-CM-^Q M-CM-^Q0M-CM-^Q M-CM-^Q0M-CM-^QSubeer ChatterjiM-CM-^Q109027M-CM-^QCR 2859-BI - Job Cost reports - Accept accounts
I need to replace M-CM-^Q with M-BM-6 in above file. This will let me see ├В┬╢ when i open the file with wordpad.
I used following command but no use:
sed 's/M-CM-^Q/M-BM-6/g' current.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:11 PM
тАО04-07-2009 10:11 PM
Re: replace text with a symbol in a file
Open this file into vi go to vi command prompt by pressing Ecs and then :
at : type below command and press return
:1,$s/M-CM-^Q//gp
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:18 PM
тАО04-07-2009 10:18 PM
Re: replace text with a symbol in a file
ohh forgot one thing to replace M-CM-^Q into M-BM-6 then you have to give below command
:1,$s/M-CM-^Q/M-BM-6/gp press 2 time return key
with sed
sed 's/M-CM-^Q/M-BM-6/g'
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:21 PM
тАО04-07-2009 10:21 PM
Re: replace text with a symbol in a file
sed 's/M-CM-\^Q/M-BM-6/g' < test
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:43 PM
тАО04-07-2009 10:43 PM
Re: replace text with a symbol in a file
If ^Q character came by pressing Ctrl+V+Q then \ is required before ^ else its not required
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:52 PM
тАО04-07-2009 10:52 PM
Re: replace text with a symbol in a file
90966├Г 24936├Г DR├Г ├Г Template├Г ├Г 0├Г ├Г ├Г ├Г ├Г 0├Г CR├Г 2859├Г ├Г 0├Г ├Г 0├Г Subeer Chatterji├Г 109027├Г CR 2859-BI - Job Cost rep
orts - Accept accounts without object account├Г After a change in the Capex Budget set up, we will use accounts without object
account.
I guess i will have to replace A character above but it needs to be done through sed only since i will use it in script later.
Attaching the file. see if you all can vi on it and see if the characters can be changed to ├В┬╢
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 11:50 PM
тАО04-07-2009 11:50 PM
Solution90966M-CM-^Q24936M-CM-^QDRM-CM-^Q M-CM-^QTemplateM-CM-^Q
This more(1) output is useless. You need to use more -v. Or you need to use vi, or possibly vis.
>see if you all can vi on it and see if the characters can be changed to ├Г ├В┬╢
Yes, you can use vi. But I have no idea which char match your more(1) output.
Here is the "vis -x" output:
$ vis -x 326360.txt
90966\xc3\x9124936\xc3\x91DR\xc3\x91 \xc3\x91Template\xc3\x91 \xc3\x910\xc3\x91
\xc3\x91 \xc3\x91 \xc3\x91 \xc3\x910\xc3\x91CR\xc3\x912859\xc3\x91 \xc3\x910\xc3
\x91 \xc3\x910\xc3\x91Subeer
What needs to be changed?
M-CM-^Q is probably \xc3\x91
M-BM-6 is probably \xc2\xb6
- Tags:
- vis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 12:24 AM
тАО04-08-2009 12:24 AM
Re: replace text with a symbol in a file
echo 'sed "s/\xc3\x91/\xc2\xb6/g" 326360.txt' | inv >> sed_script.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 12:48 AM
тАО04-08-2009 12:48 AM
Re: replace text with a symbol in a file
Thanks a lot. Your suggestion was to the point. I am able to run the script with the desired output now.
Thankq everyone!!