field separation not using awk -f option
Hi all,
my problem is to separate two fields which are separated by = not using the awk command.. suppose if I give " -dir=/usr/home/ " this line I should be able to get "-dir" and "/usr/home" separately. in this case = is the separation character. so is there any way I can separate two fields not using awk -f command..??? |
Moin,
this is because the -f option of awk does NOT define field separators. It defines a script to execute in awk. You want to use -F. If you do not want to use awk, you could use cut: Code:
FNAME=`echo "-dir=/my/path" | cut -f1 -d=` |
All times are GMT -5. The time now is 02:10 PM. |