ianw1974 Posted August 7, 2011 Author Report Share Posted August 7, 2011 OK, will have a look tomorrow and see if it works :) Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted August 10, 2011 Author Report Share Posted August 10, 2011 Yes, the SA does appear after the 6 - 9 numbers, and that's what I was needing to accomplish. First, identify the 6 - 9 numbers, then replace the SA that follows. As I mentioned earlier, a colleague managed to do it with perl, so it's not that important, but I expected sed could do it somehow. I'm just limited in my knowledge of sed to be able to complete it, and so was interested in how it might work. I tried a combination of pauls with silversurfers: sed 's/^*[0-9]{6,9}SA/-newsa-/ 1' < file > file2 find the numbers from 6 - 9 in length, then locate the SA which follows, but it didn't work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.