I'm making a script that checks some thing in a log file and compare it with $arg.
The comparing **** is working perfectly, only each line in the log is timestamped in 'unix' time (only a row of numbers, like 1017854413). I want to convert that time to DD/MM/YY and hh:mm:ss. I know hot to do it (clock format .....), but when i use this function, it says that it expects an int, not a sting, so i need to convert this piece of the string (it's split already in f_time) to an int value, but afaik there is no function for it (like string toint or somehint like that).
And i'm not fealing like writing a function like:
switch $<vartoconverttostring> {
"0" : { return 0 }
"1" : { return 1}
and so on.
}
Can someone help me plz, or perhaps ther already IS a function for this...
technically there is no int in tcl. what its requesting is that whatever string you're passing to it consists only of the characters 0-9. I suspect that you may have some leading/trailing spaces in whatever string you're passing to it, or possibly its in a list format (in which case you may have some {} in it).