I currently use this function to trim spaces from a string
function trim(str){
nsub1=sub("^[ ]*", "", str)
nsub2=sub("[ ]*$", "", str)
return str
}
I tried to use
nsub1=sub("^[ ]*", "\t", str)
nsub3=sub("[...
I currently use this function to trim spaces from a string
function trim(str){
nsub1=sub("^[ ]*", "", str)
nsub2=sub("[ ]*$", "", str)
return str
}
I tried to use
nsub1=sub("^[ ]*", "\t", str)
nsub3=sub("[ ]*$"...
I am reading a database that has triling blanks in the data so when I do a length($0) and use this to define the substr($0,4,length($0)- 4) I want to use. The data contains text and thus removing spaces from the end using a gsub may be tricky
This shows up bigtime when I try to append two...
I am parsing a html file that has special characters for &, !, etc and I would like to convert these automatically for ascii output(tab delimeted file) any hints ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.