Hi,
this is my 1st question.
I have a file seperated by " ".
I want to say that if my 1st field match to a specific string then
Change FS to "/" and take the last field.
Then change again the FS to " ".
The following doesn't work:
BEGIN{FS=" "}
{if ($1 ~ "DDL")
{FS="\/"; print $NF; FS=" "}
else {print $0}
}
A line example is this
INPUT_DDL_FNAME01 /EuroCards/dict/CutDuplicates.ddl
Any help would be appreciated
this is my 1st question.
I have a file seperated by " ".
I want to say that if my 1st field match to a specific string then
Change FS to "/" and take the last field.
Then change again the FS to " ".
The following doesn't work:
BEGIN{FS=" "}
{if ($1 ~ "DDL")
{FS="\/"; print $NF; FS=" "}
else {print $0}
}
A line example is this
INPUT_DDL_FNAME01 /EuroCards/dict/CutDuplicates.ddl
Any help would be appreciated