giuseppe...@gmail.com
unread,Jan 7, 2013, 1:01:26 PM1/7/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
hi
i'm trying to run multi-core bash script with xargs with an awk command inside.
for dir in UA_tile_txt $(for n in `seq 1 41` 50 ; do echo UA_buf$n"_tile_txt" ; done ) ; do echo $dir ; done | xargs -n 1 -P 16 bash -c $'
dir="$1"
IN_UA=/weldgfs/p51/gius_urban/pop_urban/buffer_tif
cat $IN_UA/$dir/UA_treeh??v??.txt > $IN_UA/$dir/UA_tree_all.txt
cat $IN_UA/$dir/UA_bareh??v??.txt > $IN_UA/$dir/UA_bare_all.txt
awk \'{ printf "%i %i %.4f\n" , $1, $2 , $2 *$3 }\' $IN_UA/$dir/UA_tree_all.txt | sort -k 1,1 -g > $IN_UA/$dir/UA_tree_all_s.txt
' _
exit
the script run without error if i use awk print instead if i use printf it fails.
Probably is due tu the " inside awk. I tried to escape with \" but dose not work.
Could you suggest a solution?
thanks
Giuseppe