Hello, I am using awk to split a file into multiple files using command:
nawk '{
if ( $1 == "<process" )
{
n=split($2, arr, "\"");
file=arr[n-1]
}
print > file }' processes.xml
I am looking to create 2 files Process1.process and Process2.process, but I am getting error for Process2 as the name is "Applications/Process2.process"
awk: cmd. line:6: (FILENAME=../processes.xml FNR=4) fatal: can't redirect to `Applications/Process2.process' (No such file or directory)
How do I yank "Applications/" as part of the script.