Mar 1, 2005 #1 uguess Technical User Nov 5, 2004 40 CA if i have following path path1=H:\Smartscan\Canada\35A\Set_DE\ if i want to extract Set_DE thru awk. how can it work. I tried below command but get errors. echo $path1 | awk -F:\ "{print $4}
if i have following path path1=H:\Smartscan\Canada\35A\Set_DE\ if i want to extract Set_DE thru awk. how can it work. I tried below command but get errors. echo $path1 | awk -F:\ "{print $4}
Mar 1, 2005 #2 PHV MIS Nov 8, 2002 53,708 FR As you're in the UNIX Scripting forum, here an unix syntax: path1='H:\Smartscan\Canada\35A\Set_DE\' echo "$path1" | awk -F\\ '{print $(NF-1)}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
As you're in the UNIX Scripting forum, here an unix syntax: path1='H:\Smartscan\Canada\35A\Set_DE\' echo "$path1" | awk -F\\ '{print $(NF-1)}' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244