You will need to use C or perl or or ruby -- some language. bash, ksh, nawk and other standard utilities that come with Solaris do not "do dates" like the GNU coretuils do.
So if someone posts an example using "date" or "awk" it will not work unless you have the GNU coreutils installed.
Here is a C example, someone else may post a perl example.
/usr/sfw/bin/gcc (C compiler) is part of the standard Solaris 10 && 11 install
Hi all
I have a script as follows :-
#!/usr/bin/ksh
IDT=`date +"%OH%M%S"`
while true
do
echo ${IDT}
sleep 1
done
I need the time to show me the current runtime value for the time, however this returns the time as at the start of the script.
Any ideas.
Thanks
JH (4 Replies)
Hello to all,
I am looking of a python script that can fetch date & time from wolfram or any website that gives correct time.
1. Open woflram.com website
2. Search query "time"
3. Search result displays the time.
The script has to contact the website with the search query, take that... (5 Replies)
Hi everybody,
I want to get the current time in epoch format (in UNIX or Korn Shell) and store it in a variable called
currentTime. Any response will be highly appreciated:)
Thanks in advance,
omoyne:D (8 Replies)
This is a new one on me. We upgraded a system from AIX 5.3 TL 7 to 6.1 TL 7 yesterday. The app people notified us that their cron jobs weren't running at the right time. So I made a test cron entry and here's what I've found:
# crontab -l
* * * * * /usr/bin/date > /tmp/test.log 2>&1
# cat... (2 Replies)
give a date and time:
Jun 12 21:05:16
06-12-2012 21:05:16
2012/06/12 21:05:16
How can i subtract these dates and times from the current date and time and get back the difference in seconds?
a one liner like:
echo "Jun 12 21:05:16" | some perl/awk programming
90900s (2 Replies)
Hi,
How can i change the time below (red font) with the current year?
Thank You in advance.
hostname 2007-Feb-9 /u100/DEVCO/Patching a.log
hostname 2010-Jun-25 /u100/DEVCO/DumpCleaner a.log
hostname 2011-Jun-25 /u100/DEVCO/DumpCleaner/sample a.log
hostname 23:44-Jun-25... (2 Replies)
Hi Folks,
My server time is in EDT. And i am sending automated mails from that server in which i need to display the current date time as per IST (GMT+5:30). Please advice how to display the date time as per IST.
IST time leads 9:30 mins to EDT. and i wrote something like below.
... (6 Replies)
i have file 1.txt
asdas|csada|13|03|10|04|23|A1|canberra
sdasd|sfdsf|13|04|26|23|28|A1|sydney
i want to add today's date and time in the end of each row
expected output
asdas|csada|13|03|10|04|23|A1|canberra|130430|1358
sdasd|sfdsf|13|04|26|23|28|A1|sydney|130430|1358
todays date... (10 Replies)
Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone.
For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
LEARN ABOUT DEBIAN
ruby-switch
RUBY-SWITCH(1)RUBY-SWITCH(1)NAME
ruby-switch - switch between different Ruby interpreters
USAGE
ruby-switch --list
ruby-switch --check
ruby-switch --set RUBYVERSION
ruby-switch --auto
DESCRIPTION
ruby-switch can be used to easily switch to different Ruby interpreters as the default system-wide interpreter for your Debian system.
When run with --list, all supported Ruby interpreters are listed.
When --check is passed, ruby-switch will check which Ruby interpreter is currently being used. If the settings are inconsistent -- e.g.
`ruby` is Ruby 1.8 and `gem` is using Ruby 1.9.1, ruby-switch will issue a big warning.
When --set RUBYINTERPRETER is used ruby-switch will switch your system to the corresponding Ruby interpreter. This includes, for example,
the default implementations for the following programs: ruby, gem, irb, erb, testrb, rdoc, ri.
ruby-switch --set auto will make your system use the default Ruby interpreter currently suggested by Debian.
OPTIONS -h, --help
Displays the help and exits.
A NOTE ON RUBY 1.9.x
Ruby uses two parallel versioning schemes: the `Ruby library compatibility version' (1.9.1 at the time of writing this), which is similar
to a library SONAME, and the `Ruby version' (1.9.3 is about to be released at the time of writing).
Ruby packages in Debian are named using the Ruby library compatibility version, which is sometimes confusing for users who do not follow
Ruby development closely.
ruby-switch also uses the Ruby library compatibility version, so specifying `ruby1.9.1' might give you Ruby with version 1.9.2, or with
version 1.9.3, depending on the current Ruby version of the `ruby1.9.1' package.
COPYRIGHT AND AUTHORS
Copyright (c) 2011, Antonio Terceiro <terceiro@debian.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
2011-11-20 RUBY-SWITCH(1)