We hava data file which has entries in this format:
sap/base/parser/agent/wholeworld.cpp
These have to be converted into :
wholeworld.cpp|sap/base/parser/agent/
ie <filename>|<path>
This has to be done via command-line.
and we cannot do a hard-coded awk -F/ print{$NF "|" $0"/"$1.... etc.},as the path-name length will be different all over.
How can this be done ?
Even a sed-based command-line solution will suffice(leaner the better!!!!)
Any help would be appreciated
sap/base/parser/agent/wholeworld.cpp
These have to be converted into :
wholeworld.cpp|sap/base/parser/agent/
ie <filename>|<path>
This has to be done via command-line.
and we cannot do a hard-coded awk -F/ print{$NF "|" $0"/"$1.... etc.},as the path-name length will be different all over.
How can this be done ?
Even a sed-based command-line solution will suffice(leaner the better!!!!)
Any help would be appreciated