- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sed | stuck
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
тАО02-25-2009 05:07 AM
тАО02-25-2009 05:07 AM
I tried. sed s/"="/999/g but it takes out the equal sign. I want to append after the equal sign.
The input looks like this: set rlim_fd_cur=65536
Solved! Go to Solution.
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:19 AM
тАО02-25-2009 05:19 AM
Re: sed | stuck
# X="set rlim_fd_cur=65536"
# echo ${X}|sed -e 's/\=/\=9999/'
set rlim_fd_cur=999965536
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:19 AM
тАО02-25-2009 05:19 AM
Re: sed | stuck
sed s/"="/"=9999"/g
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:23 AM
тАО02-25-2009 05:23 AM
Re: sed | stuck
here is the output from s/"="/"=9999"/g
set rlim_fd_cur=999965536
I still have the 65536 at the end.
I need to search for the equal sign, delete everything after it and replace it with 4 9's.
sorry I wasnt clear. Im stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:26 AM
тАО02-25-2009 05:26 AM
Re: sed | stuck
> I need to search for the equal sign, delete everything after it and replace it with 4 9's.
That's what I meant when I said I think I took you too literally :-) See my post immediately before yours.
echo ${X}|sed -e 's/\=.*/\=9999/'
set rlim_fd_cur=9999
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:26 AM
тАО02-25-2009 05:26 AM
Re: sed | stuck
now what if each input line might have different numbers after the '=' sign.
is there a way I can delete whatever is after the '=' sign and replace it with 4 9's ?
you guys are good. I feel stupid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:27 AM
тАО02-25-2009 05:27 AM
Re: sed | stuck
Thanks again really.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 05:34 AM
тАО02-25-2009 05:34 AM
Re: sed | stuck
actually I think even if I did write scripts all the time they would be half a mess.
looked so easy but I found it difficult. probably because 22% of my brain is clogged with malted hopps from vegas last week.
thats my excuse anyway.
Thanks James, you have helped me many times over the years. your company should be proud to have you on staff.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-25-2009 08:26 AM
тАО02-25-2009 08:26 AM
Re: sed | stuck
>now what if each input line might have different numbers after the '=' sign.
If there are different numbers AND you want to keep stuff after the numbers:
sed 's/=[0-9]*/=9999/'
- Tags:
- ch_rc