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("[ ]*$"...
Example code
as requested
AB Wrestling promoters Jonesy (Abbott) and Max (Costello) trail their
runaway fighter to Algiers where they're tricked into joining the
French Foreign Legion. They have to cope with a sadistic sergeant and
a sexy spy (Medina)...
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...
sorry about the last post of data I did not preview the post
unfortunatgly the web nature of the forum is interpreting the ascii text to web
so note this is what I meant to send but ignore the spaces in the first field (I have spaced the data so that the HTML nature of the forum will not...
great news about gawk but what do you call
...gsub would be tedious and require every sprecial character to be translated (i.e. a gsub for every accent, &, ! etc...)
sample data
Data Resulting Data
---- ---------------
Amélie = Amelie (with...
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.