Extract 2 characters in file
Hello,
I want to extract 2 characters of the first column of the one file, that file has 19 columns, in bash script.
the first column is some thing like this 2005-07-25, and
I want to extract 07. I wrote this code
awk '{ print $ substr ($1,6, 2)}, but out put is he whole
of the column: 2005-07-25!
can you help me?
Questions by Baran_22
Showing Answers 1 - 24 of 24 Answers
Related Answered Questions
Related Open Questions
Extract 2 characters in file
I want to extract 2 characters of the first column of the one file, that file has 19 columns, in bash script.
the first column is some thing like this 2005-07-25, and
I want to extract 07. I wrote this code
awk '{ print $ substr ($1,6, 2)}, but out put is he whole
of the column: 2005-07-25!
can you help me?
Profile Answers by Baran_22 Questions by Baran_22
Questions by Baran_22
Related Answered Questions
Related Open Questions