Skip to main content

Timeline for bash string to int

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Mar 9, 2018 at 13:56 history edited Stéphane Chazelas CC BY-SA 3.0
added 3 characters in body
Sep 24, 2012 at 15:26 vote accept CommunityBot
Sep 24, 2012 at 6:59 comment added dubiousjim Nice! Like bash, awk also stores even numerical values as strings. But this works because when a variable is used in a numerical context, awk strips off any trailing non-numerical junk. (It would also strip off any leading spaces, if $5 happened to contain some. When you use the default field-separation, though, $5 won't.)
Sep 24, 2012 at 6:19 review Low quality posts
Sep 24, 2012 at 6:51
Sep 24, 2012 at 6:17 history answered Stéphane Chazelas CC BY-SA 3.0