ianw1974 Posted August 7, 2011 Author Report Share Posted August 7, 2011 OK, will have a look tomorrow and see if it works :) 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now