- ÂÛ̳»ÕÕÂ:
- 0
|
- test$ echo "a\b\c" | awk -F'\\\\' '{OFS="@"; print $1,$2,$3}'
- a@b@c
¸´ÖÆ´úÂë ×¢ÒâÉÏÃæ4¸ö\ÍâÃæÊǵ¥ÒýºÅ
ÏÂÃæµÄ´úÂë¿ÉÒÔʵÏÖÏàͬµÄЧ¹û£º- test$ echo "a\b\c" | awk -F\\\\\\\\ '{OFS="@"; print $1,$2,$3}'
- a@b@c
¸´ÖÆ´úÂë ¼´8¸ö\ÍâÃæûÓÐÒýºÅ
ºÍ8¸ö\ÍâÃæÓÐË«ÒýºÅЧ¹ûÏàͬ£º- test$ echo "a\b\c" | awk -F"\\\\\\\\" '{OFS="@"; print $1,$2,$3}'
- a@b@c
¸´ÖÆ´úÂë ÎÒµÄÎÊÌâÊÇ£º
shellÖе¥ÒýºÅºÍË«ÒýºÅµÄÇø±ðÊǵ¥ÒýºÅ°ÑËùÓÐ×Ö·û¶¼¿´³ÉÆÕͨ×Ö·û£¬ËùÒÔ²»¶ÔתÒå·û½øÐÐתÒ壬ËùÒÔ´«µÝ¸øawkʱӦ¸ÃÊÇ4¸ö\£¬awkÔÙ½øÐÐתÒåÓ¦¸ÃÊÇ2¸ö\²Å¶Ô£¿µ«´ÓÉÏÃæ¿´awkÏÔʾ°Ñ·Ö¸ô·ûµ±³É1¸ö\£¬ÄÇ»¹ÓÐÒ»°ëµÄתÒå·û±»Ë³ÔÁË£¿bash»¹ÊÇawk£¿ |
|