| Author |
Deleting the first n characters of a field
|
|
| Joe Farish 2004-11-16, 6:50 pm |
| I have some data in the following format:
(Script(ID-VG))
I want to be able to remove the "(Script" part at the start of the
field. Does anyone know how to do this?
I know its possible to remove the last n characters of the field
because I can allready do this using the length command.
Thanks in Advance
JAF
| |
| Robert Stearns 2004-11-16, 6:50 pm |
| $i = substr($i,8)
Joe Farish wrote:
> I have some data in the following format:
>
> (Script(ID-VG))
>
> I want to be able to remove the "(Script" part at the start of the
> field. Does anyone know how to do this?
>
> I know its possible to remove the last n characters of the field
> because I can allready do this using the length command.
>
> Thanks in Advance
>
> JAF
| |
| Ed Morton 2004-11-16, 6:50 pm |
|
Joe Farish wrote:
> I have some data in the following format:
>
> (Script(ID-VG))
>
> I want to be able to remove the "(Script" part at the start of the
> field. Does anyone know how to do this?
>
> I know its possible to remove the last n characters of the field
> because I can allready do this using the length command.
>
> Thanks in Advance
>
> JAF
gawk '{sub(/\([^(]*/,"")}1'
Ed.
|
|
|
|