BASH: string is "charset=iso-8859-1", I want to extract "iso-8859-1" only. How??
Hello all,
I think this is an easy question to answer, but I can't seem to figure it out. 'sed' is for files, not variables... I get: Code:
<myfile>: text/x-c++; charset=iso-8859-1 Code:
file -i <myfile> Thanks in advance, rm |
This should work:
Code:
var1="<myfile>: text/x-c++; charset=iso-8859-1" Code:
var1="<myfile>: text/x-c++; charset=iso-8859-1" |
Alternatively
Code:
var1='<myfile>: text/x-c++; charset=iso-8859-1' |
Many thanks to both or you. It worked like a charm!
I'm going to post my second question in a separate post (text format conversion, no longer above for those of you who didn't answer this post. It can be found here: http://www.linuxquestions.org/questi...95#post4794795). rm |
All times are GMT -5. The time now is 07:27 PM. |