- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sed and c-shell script
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
11-07-2000 10:13 AM
11-07-2000 10:13 AM

The file name "SHbe1820.jpg" changes with each file I get and on a daily basis.
Following is the line in my sed script:
s/img src="*.jpg/img src="{!=VW_UCntx.getDocsURL()!}/images/complogo.jpg/g
Can anyone tell me what I'm doing wrong?
Thanks!
Solved! Go to Solution.
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:32 AM
11-07-2000 10:32 AM
Re: sed and c-shell script
Could you put the line in question in a file and append it to a post in this thread.
It looks a kind of complicated (and maybe some characters got lost).
Bye,
Rik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:41 AM
11-07-2000 10:41 AM
Re: sed and c-shell script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:42 AM
11-07-2000 10:42 AM
Re: sed and c-shell script
every day you get which file to replace with what and its new path.
Based on the above,
sed 's/somefile.jpg//newlocation/subdirectory/otherfile.jpg/g' test.old > tests.html
To hint you . is treated as any character in the regular expression you are searching for, Incase if your reg-exp has / to be searched or replace you need to prefix with to negate the meaning what sed has.
Hope this helps.
......Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:43 AM
11-07-2000 10:43 AM
Solution1) You need to wildcard more specifically in sed. '*' just menas any number of the preceding character. '.*' gets you what you want.
2) You cannot use / within a replacement string if you are using it as teh string delimiter. You can get around this by escaping the / with \ inside the replacement, but that gets ugly pretty quickly. I find it cleaner to simply use another character as my string delimiter in sch situations. In the example below, I have used %.
sed 's%img src=".*.jpg%img src="{!=VW_UCntx.getDocsURL()!}/images/complogo.jpg%g'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:51 AM
11-07-2000 10:51 AM
Re: sed and c-shell script
Thanks,
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2000 10:59 AM
11-07-2000 10:59 AM
Re: sed and c-shell script
Thank you, thank you, thank you. Works like a charm. My butt is now off the 'hot seat'!
Mo