echo "halloe wie gehts 1 2 3 4" | awk '{sub(/$3[ \t]/,""); o=$1; for (i=2;i<NF;i++)o=sprintf("%s:%s",o,$i); printf("%s\n",o)}'
halloe:wie:gehts:1:2:3

echo "halloe wie gehts 1 2 3 4" | awk '{sub($3"[ \t]",""); gsub(FS,":"); print}'
halloe:wie:1:2:3:4

computer2know :: thank you for your visit :: have a nice day :: © 2024