Results 1 to 3 of 3
I have a task of migrating scripts from SunOS to Linux, tehre is a
.awk file, which has a function double
e.g
double(substr("abcwertert", 7,1));
it works perfectly on SunOS but ...
- 12-11-2007 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 11
does double() work on UNIX?
I have a task of migrating scripts from SunOS to Linux, tehre is a
.awk file, which has a function double
e.g
double(substr("abcwertert", 7,1));
it works perfectly on SunOS but on Linux it says,
awk: test.awk:6: fatal: function `double' not defined
please help
thank you
- 12-12-2007 #2Linux User
- Join Date
- Aug 2006
- Posts
- 458
it should be a user defined function in awk from Solaris version.
show the whole code if you can
- 12-13-2007 #3Just Joined!
- Join Date
- Dec 2007
- Posts
- 11
sym = substr($0,1,11);
if (sym ~ /\t/) sym = sprintf("%-11.11s",substr(sym,1,index(sym,"\t")-1));
Symbol [ symcounter ] = sym;
SymbolStatus [ sym ] = 1;
BaseValue [ sym ] = double(substr($0, 12,length-11));


Reply With Quote