Last active
December 19, 2015 16:08
-
-
Save hatappo/5980972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# awk. Default delimiter is blank character with the longest match. | |
echo 'a b c' | awk '{print $1 " " $2 " " $3 " " $4}' | |
#=> a b c | |
# cut. Default delimiter is a single blank charcter. | |
echo 'a b c' | cut -f1,2,3,4 | |
#=> a b c | |
# awk. Delimiter option is "-F" | |
echo 'a b c' | awk -F" " '{print $1 " " $2 " " $3 " " $4}' | |
#=> a b c | |
# cut. Delimiter option is "-d". | |
echo 'a b c' | cut -d" " -f1,2,3,4 | |
#=> a b c | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment