I have a file as follows
100 sesCook=0ea4ce6259b087f5aec09934b3aab9fe4f0ee62d
100 sesCook=71e16fadaf9c5c57e7ef706a60f768bcffad7fc1
100 sesCook=a60cbaaed8349260783309a72c8bcdbd4d030255
100 sesCook=f8470d1272c4d9c1b69682260ed1b558c7a2dd55
101 sesCook=83b867a10e3d9d3b727d281548dcf6c29efb9382
101 sesCook=e7c4a834d57576d73e66883d7fbfbc8160125569
I want to have the fi开发者_StackOverflow社区rst column as it is. However in the second column i want to cut all "sesCook="
and just have the pattern eg:
100 0ea4ce6259b087f5aec09934b3aab9fe4f0ee62d
100 71e16fadaf9c5c57e7ef706a60f768bcffad7fc1
100 a60cbaaed8349260783309a72c8bcdbd4d030255
100 f8470d1272c4d9c1b69682260ed1b558c7a2dd55
101 83b867a10e3d9d3b727d281548dcf6c29efb9382
101 e7c4a834d57576d73e66883d7fbfbc8160125569
How do i do this using awk or cut ?
sed would probably be a better tool:
sed -e 's|sesCook=||'
But if you really want awk, this will split it on the '=' sign:
awk -F'[[:space:]=]' '{print $1, $3}'
精彩评论