hi there, I have a question about a snippet of code i have which runs localtime() to convert the current date/time into a mysql happy format
If i run the above as a standalone script, i get the desired result
However, what i want to do is incorporate it as part of another script and populate an internal variable with the result rather than sending it to standard out ...so i tried this
but as you can see, not only has it still output to result to standard out (not ideal), but it has populated the variable $datatime with the value "1"
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
I am trying to install GCC-3.1.1 on an SGI Indigo2. I already have MIPSpro 7.2.1 installed. However, when I try to configure GCC-3.1.1, I get the message "cc ERROR: cc -o conftest -g failed, You must set the environment variable CC to a working compiler."
What is the name of the MIPSpro c++... (1 Reply)
I want to set a variable to be any number of dashes. Rather than doing the following:
MYVAR="------------------"
I'd like to be able to set the variable to, say, 80 dashes but don't want to have to count 80 dashes. Is there a way to do this? (2 Replies)
L=0
cat test.sh | while read line
do
L='expr $1 + 1'
echo $L
done
echo $l
>>> the echo $L at the end produces 0 but i actually want it to produce the number of lines - any idea why this is happening? (16 Replies)
How do you set a varible with information that contains a string and also another variable? For example:
subject="Attention: $name / This $type needs your attention"
The $xxxx are of course other variables that I instantiated earlier. Is it like Java where you have to use double quotes and... (1 Reply)
In my script, I have the following command....
du -sk `ls -ltd sales12|awk '{print $11}'`|awk '{print $1}'
it returns the value
383283
I want to modify my script to capture that value into a variable. So, I try doing the following...
var1=`du -sk `ls -ltd sales12|awk '{print... (5 Replies)
I am working within a while loop and i am trying to set a variable that will read out each count of the files. the problem is the count variable i have set up gives me a total and not the individual count of each file. in the data area there is 4 abc.dat and 1 def.dat.
how can i do this???
... (2 Replies)
Hi,
I already have one CPP program which invokes the C program.And the C program contains whole function definitions..!This is a working program..I have to enable the logs in both CPP as well as in the C program ..!So I am reading the enviornmental variable log path from the CPP and doing the... (2 Replies)
Hi,
i have a variable which i would like to set inside an if block
for example
IS_VAR=0
if
then
IS_VAR=1
fi
echo IS_VAR
the last echo statement gives 0.So setting variables in the if block doesnt have effect outside the block?Is there any workaround for this?
Thanks ,
Padmini (11 Replies)
This's my problem
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "en_US.UTF-8",
LC__FASTMSG = "true",
LC_MESSAGES = "",
LC_CTYPE = "en_US.UTF-8",
LC_TYPE = "en_US.UTF-8",
LANG = "EN_US"... (1 Reply)
Discussion started by: bobochacha29
1 Replies
LEARN ABOUT DEBIAN
tai64nlocal
tai64nlocal(8) System Manager's Manual tai64nlocal(8)NAME
tai64nlocal - converts precise TAI64N timestamps to a human-readable format.
SYNOPSIS
tai64nlocal
DESCRIPTION
tai64nlocal reads lines from stdin. If a line does not begin with @, tai64nlocal writes it to stdout without change. If a line begins with
@, tai64nlocal looks for a timestamp after the @, in the format printed by tai64n(8), and writes the line to stdout with the timestamp con-
verted to local time in ISO format: YYYY-MM-DD HH:MM:SS.SSSSSSSSS.
For example, in the US/Pacific time zone, the input line
@4000000037c219bf2ef02e94 mark
should be printed as
1999-08-23 21:03:43.787492500 mark
Beware, however, that the current implementation of tai64nlocal relies on the UNIX localtime library routine to find the local time. Some
localtime implementations use a broken time scale that does not account for leap seconds. On systems that use the Olson tz library (with an
up-to-date leap-second table), you can fix this problem by setting your time zone to, e.g, right/US/Pacific instead of US/Pacific.
Beware also that most localtime implementations are not Y2038-compliant.
tai64nlocal does not allocate any memory after it starts, except possibly inside localtime.
EXIT CODES
tai64nlocal exits 0 when it sees end of input. It exits 111 without an error message if it has trouble reading stdin or writing stdout.
SEE ALSO supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), readproctitle(8), fghack(8), pgrphack(8), multilog(8), tai64n(8), setu-
idgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8)
http://cr.yp.to/daemontools.html
tai64nlocal(8)