This is a very popular Unix question, How to get 3rd char from a 3rd column of a tab delimited file ? We are usually know how to get the nth column by using "CUT" or "AWK" command. But not aware with this "CUT" options which can give the particular column. Lets see how to use this -
===================================================================================================================================
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
# To get 4th char from a string | |
echo 123456789 | cut -c4 | |
# To get 7th char from a string | |
echo 123456789 | cut -c7 | |
# To get 3rd and 4th char from a string | |
echo 123456789 | cut -c3,4 | |
# To get 3rd char and so on from a string | |
echo 123456789 | cut -c3- |
===================================================================================================================================
Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098
Like the Facebook Page & join Group
https://www.facebook.com/DataStage4you
https://www.facebook.com/groups/DataStage4you
https://twitter.com/datastage4you
https://groups.google.com/d/forum/datastage4you
For WHATSAPP group , drop a msg to 91-88-00-906098
No comments :
Post a Comment