sed: how to change MAC address string with sed
Hello *,
please I need to know how can I change the MAX address string using sed. What I need is to add or subtract number from MAC address, e.g. Input string: ethaddr=00:21:04:4D:BB:00 Output string ethaddr=00:21:04:4D:BB:05 Sorry for bugging but I don't have enough time to study the solution by myself and I'm not experienced with sed :-(. Many thanks in advance. jn. |
Quote:
This is not a good way to get help here.... First, you don't say what the criteria is for making a change. For example, is it always the last portion that needs to be changed? Do we need to test and sure the target number is part of a MAC? ....etc. Second, why SED? If you set the the field separator to ":", then AWK is very handy for discriminating columns. |
Quote:
|
I have the time, and I know enough about awk (but not sed) to be able to accomplish the task, but I don't have enough time to post the solution
|
Guys,
I didn't have time to learn SED (no AWK on board) since I had some tight deadlines when this task had to be finished. Please if you don't want to help, don't start flames here. |
Sorry, cold, but you started it.
If you read the thread, you'll see that I did want to help----I asked you a question which you apparently did not have time to answer. (My post was less than an hour after your started the thread.) Quote:
|
All times are GMT -5. The time now is 08:18 AM. |