Tag Archives: TIME

A Simple Clock, Well Maybe Not That Simple…

By wisecracker

File Type: jpg
The attachment says it all really…

It is a DEMO at a glance digital readout using the “date” command to make it useful…

Enjoy…

Code:

#!/bin/bash
#
# Clock.sh
# A bash DEMO to create a 6 x 7 character set using the whitespace character.
# It is a functional digital clock but this is not important as I want this
# method for an _at_a_glance_ digital display for a kids level shell digital
# voltmeter I am in the process of doing.
#
# The clock in normal size is white on black near the top. The extra large clock
# is green on black and in the centre of the terminal..
#
# $VER: Clock.sh_Version_1.00.00_(C)2013_B.Walker_G0LCU.
# Issued under GPL2.
#
# Written so the anyone can understand how it works.

# Set the window to white foreground on black background.
printf "x1B[0;37;40m"
clear
# Remove the cursor.
tput civis
# Set up all _variables_ as is required.
TIME=`date "+%H:%M"`
char="0"
# The plot _variable_ "p".
p="(C)2013, B.Walker, G0LCU."
# The background colours.
bg="x1B[0;37;40m"
# The foreground colours.
fg="x1B[0;37;42m"
# The initial character plotting points.
horiz=10
vert=9
# This function reads the time and stores it in "TIME".
clock()
{
TIME=`date "+%H:%M"`
printf "x1B[2;32f$bg The time is $TIME.n"
}
# This function is required to coreectly print out the large characters.
plot()
{
p="x1B["$vert";"$horiz"f"
vert=$[ ( $vert + 1 ) ]
}
# *********************************************************
# The eleven characters required for this DEMO are 0 to 9
# and the : colon character.
zero()
{
plot
printf "$p$bg $fg $bg "
plot
printf "$p$fg $bg $fg $bg "
plot
printf "$p$fg $bg $fg $bg "
plot
printf "$p$fg $bg $fg $bg $fg $bg "
plot
printf "$p$fg $bg $fg $bg "
plot
printf "$p$fg $bg $fg $bg "
plot
printf "$p$bg $fg $bg "
}
one()
{
plot
printf "$p$bg $fg $bg "
...read more

Source: FULL ARTICLE at The UNIX and Linux Forums

The Lone Ranger’s Last Request


The Lone Ranger was ambushed and captured
by a hostile Indian War Party.

The Indian Chief proclaimed,

“So, YOU are the great Lone Ranger“…

“In honour of the Buffalo Hunt,
YOU will be sacrificed in three days.”
“Before we kill you, I grant you three requests.”

“What is your FIRST request?

The Lone Ranger said,
“I’d like to speak to my horse.”

The Chief nodded and Silver was brought
before the Lone Ranger
who whispered in
Silver’s ear, and the horse galloped away.

Later that evening, Silver returned with
a beautiful blonde woman on his back.

As the Indian Chief watched,
the blonde
entered the Lone Ranger‘s tent
and spent the night.

The next morning the Indian Chief admitted
that he was impressed.

“You have a very fine and loyal horse,”

but we will still kill you in two days.”

“What is your SECOND request?”
The Lone Ranger again asked to speak
to his horse.

Silver came to him,
and he again whispered in the horse’s ear.

As before, Silver took off and disappeared
over the horizon.

Later that evening, to the Chief’s surprise,

Silver again returned,
this time with a voluptuous brunette,

even more attractive than the blonde.

She entered the Lone Ranger‘s tent
and spent the night.

The following morning the Indian Chief
said:

“You are indeed a man of many talents,”

“But we will still kill you tomorrow.”

“What is your LAST request? “
The Lone Ranger responded,

“I’d like to speak to my horse – alone.”

The Chief was curious, but he agreed,

and Silver was brought to
the Lone Ranger‘s tent.

Once they were alone,
the Lone Ranger grabbed Silver
by both ears,
looked him square in the eye and said,

Listen Very Carefully! FOR…THE…LASTTIME

“BRING POSSE!”

TIME 100: Apple's Jony Ive Is An 'Artist,' Bono Sings Praises

By Anthony Wing Kosner, Contributor

This year’s Time 100 list is now public and ‘s Jony Ive can add “Artist” to his list of accolades. Time places its “100 most influential people in the world,” in one of five categories: artists, leaders, pioneers, titans and icons. These buckets are sometimes an awkward fit, so before we slap a jaunty beret atop Ive’s head (as I have above) it’s worth asking the two most obvious questions: is he indeed an artist and, if so, is that a good thing?

From: http://www.forbes.com/sites/anthonykosner/2013/04/20/time-100-apples-jony-ive-is-an-artist-bono-sings-praises/

Inserting text into a file with awk or sed

By Schubi

Hello,

I’ve been trying to get a script working that fetches weather-data and converts it into an .ics file. The script works so far put I’m stuck at the point where I need to add specific static data. A thorough search through the forum did not point me into the right direction.

Code:

#!/bin/bash
##### Begin
DATE=$(date +'%Y%d%m')
TIME=$(date +'%H:%M:%S')
TEMPFILE="$(mktemp temp.XXX)"

if [ $? -ne 0 ]; then
echo "$0: Can't create temp file, exiting..."
exit 1
fi

##### Fetching weather data
curl http://ical.wunderground.com/auto/ical/global/stations/48698.ics?units=metric | awk 'NR==1 || NR==5 || NR==6 || NR==10 || NR==17 || NR==18 || NR==22 || NR==24 || NR==135' > $TEMPFILE

##### Adding specific calendar data

##### Cleaning up
cat $TEMPFILE | tr -d "r" > $DATE.ics
rm $TEMPFILE
exit 0


The output is as expected a .ics file that can be imported into a calendar:

Code:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20130412T000000Z
DTSTART;VALUE=DATE:20130412
SUMMARY:Thunderstorm 32C / 26C
END:VEVENT
END:VCALENDAR


In addition to the above output, the following data set needs to be imported between lines 3 and 4:

Code:

BEGIN:VTIMEZONE
TZID:Asia/Singapore
BEGIN:DAYLIGHT
TZOFFSETFROM:+0700
DTSTART:19330101T000000
TZNAME:GMT+08:00
TZOFFSETTO:+0720
RDATE:19330101T000000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0730
DTSTART:19820101T000000
TZNAME:GMT+08:00
TZOFFSETTO:+0800
RDATE:19820101T000000
END:STANDARD
END:VTIMEZONE


I’ve been playing around with the following string but did not manage to produce a result (example):
awk ‘NR==4{$0=”BEGIN:VTIMEZONE”}1′ $TEMPFILE

Any help is appreciated!

From: http://www.unix.com/unix-dummies-questions-answers/221013-inserting-text-into-file-awk-sed.html

Notch '2nd Most Influential Person' in World

Markus ‘Notch’ Persson is currently sitting in second position on the 2013 edition of the TIME 100 Poll, putting him ahead of the likes of Barack Obama, Kim Jong Un, Jennifer Lawrence, Beyoncé and controversial pop group Pussy Riot.

In fact, the only person beating the Minecraft creator is Egyptian president Mohamed Morsi, who attracted significant international attention after rising to power last year by decreeing his actions were immune from legal challenges (this has since been annulled).

Interestingly though, Morsi is only beating Notch in terms of “Absolutely” votes; the Egyptian currently has 172,770 to Notch’s 155,658. If you work out the net difference after subtracting the “No Way” votes though, Notch is actually currently sitting in first place with +137,352.

Continue reading…

From: http://www.ign.com/articles/2013/04/12/markus-notch-persson-currently-second-most-influential-person

Penske Automotive Group to Host First Quarter Earnings Conference Call

By Business Wirevia The Motley Fool

Filed under:

Penske Automotive Group to Host First Quarter Earnings Conference Call

BLOOMFIELD HILLS, Mich.–(BUSINESS WIRE)– Penske Automotive Group, Inc. (NYS: PAG) , an international automotive retailer, will host its first quarter financial results conference call as follows:

Source: FULL ARTICLE at DailyFinance

WHEN:

  Monday, April 29, 2013
 

TIME:

2:00 p.m. Eastern Daylight Time
 

Ps output field extract

By Anu_1

This is the output from ps -ef cmd . I have to extract the fourth (C) and the seventh (TIME) field
root 3932344 3801216 0 Apr 08 – 0:00 /usr/sbin/rsct/bin/ERrmd
root 3997836 1 0 Apr 08 – 0:00 /usr/sbin/uprintfd
root 4128894 3801216 0 Apr 08 – 0:09 /usr/sbin/rsct/bin/rmcd -x
root 4325512 1 1 Apr 08 – 3:21 /usr/sbin/getty /dev/console
root 4391046 3801216 0 Apr 08 – 0:00 /bin/ksh/
root 5439640 6815806 1 12:32:31 pts/0 0:00 -ksh

I have used cut -d ” ” -f4 to extract the 4th but need some help to extract the 7th field . cut -d ” ” -f7 can’t be used because of the STIME(Apr 08).

Thanks for help

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

Guidance Software Announces 2013 Annual Meeting of Shareholders

By Business Wirevia The Motley Fool

Filed under:

Guidance Software Announces 2013 Annual Meeting of Shareholders

PASADENA, Calif.–(BUSINESS WIRE)– Guidance Software, Inc. (NAS: GUID) , The World Leader in Digital Investigations™, will host its Annual Meeting of Shareholders on Thursday, May 16, 2013.

<td class="bwpadl0 …read more

Source: FULL ARTICLE at DailyFinance

TIME:     8:30 am Pacific Time
 
LOCATION: The Hilton Pasadena
San Marino Room, Lobby Level

If Cyprus Were America

By Morgan Housel, The Motley Fool

Filed under:

Cyprus is now the most talked-about economy in the world — an odd position to be in for a country that few could find on a map until this week. 

Cyprus‘ $13 billion bailout, combined with roughly $6 billion of uninsured deposits whose future is in high doubt, seems minuscule compared with other international crises. And it is. But when put into context of how tiny a country Cyprus is, the numbers become staggering.

Cyprus has an annual GDP of $24.7 billion, according to the World Bank. Its combined bailout and deposit losses, therefore, total something around 75% of GDP.

If the United States required a bailout of equal proportion, the bill would total $12 trillion, or 18 times the size of the 2008 TARP bank bailout. Cyprus‘ deposit losses alone total up to the American equivalent of $4 trillion, or roughly equal to all the deposits held by Bank of America, Wells Fargo, JPMorgan Chase, and Citigroup combined.

Cyprus Popular Bank reported a loss of $5 billion in the year ended September 2012, according to S&P Capital IQ. The equivalent of 20% of GDP, a similar loss in the United States would total $3.2 trillion, or nearly one-quarter of the entire market capitalization of the S&P 500 . And that was just one year’s loss at one bank. In the last two years, Cyprus Popular Bank lost $8.6 billion, or more than a third of Cypriot GDP. The American equivalent would be like losing the annual output of California, Texas, New York, and Florida combined.

These comparisons are useful only because they lead squarely to one point: The Cypriot banking sector was grotesquely large in relation to its economy. This is largely because the tiny island country became a haven for foreign cash, drawing in assets at a rate many times disproportionate to the wealth of its citizens. Peter Gumbel of TIME writes:

Over the past 30 years, since the fall of the Berlin Wall, the island has banked on its ability to attract money from Russia and elsewhere as an offshore center. Oversight has been tightened up since Cyprus joined the E.U. in 2004, but it remains relatively lax by international standards, and foreign companies pay a flat tax rate of just 10%. For a while the strategy seemed to work well; Cyprus built up a gargantuan banking industry, which is currently about five times the size of its total economy, according to Standard & Poor’s.

The flood of foreign cash further relied on the belief that CyprusEU neighbors and the continent’s central bank would could to the rescue should its banking sector stumble. To an extent, they did. But not before large depositors were forced to take large haircuts on their cash. Now, senior finance members of the EU are signaling that similar deals can be used as a template for future bailouts.

The idea of a banking haven is done, in other words. After the dust settles, it is unavoidable that Cyprus …read more
Source: FULL ARTICLE at DailyFinance

'End of men'? Not even close, says report on gender in the professions

50 years after Betty Friedan‘s explosive book launched feminism’s “second wave,” 41 after Title IX, the equal-opportunity amendment banning sex discrimination in education, was signed into law – and some exceptionally successful women are making a lot of news. Former U.S. Secretary of State Hillary Clinton is riding high in public opinion, winning straw polls for the 2016 presidency. Yahoo CEO Marissa Mayer, after shrugging off maternity leave, has sparked the “Great Telecommuting Debate” with a company-wide ban on working from home. And Sheryl Sandberg, Facebook’s chief operating officer, is on the cover of TIME and every other national stage, it seems, talking about “Lean In,” her just-published memoir and “sort of feminist” manifesto on succeeding as a female in corporate America. …read more
Source: FULL ARTICLE at Phys.org

Ecolab Schedules Webcast of Industry Conference for March 20

By Business Wirevia The Motley Fool

Filed under:

Ecolab Schedules Webcast of Industry Conference for March 20

ST. PAUL, Minn.–(BUSINESS WIRE)– Daniel J. Schmechel, Ecolab’s Chief Financial Officer, will address financial analysts at the Gabelli & Company’s Specialty Chemicals Conference on Wednesday, March 20, in New York. Ecolab will host a live webcast of Mr. Schmechel’s presentation. Details for the webcast are as follows:

…read more
Source: FULL ARTICLE at DailyFinance

 

TIME:

    12:00 pm Eastern Time
 

DATE:

Miyamoto: Pikmin 3 Should've Been Released Sooner

Nintendo game designer and producer Shigeru Miyamoto has said that ideally Pikmin 3 should’ve launched with Nintendo’s latest console, Wii U.

Speaking with TIME, Miyamoto reflected on the console’s launch window, comparing it with previous launches by the company:

“If you look back at the launch of Wii, we were able to prepare a game like Wii Sports, which at the time was clearly a new game, and launch that alongside a Zelda game. With the Wii U, we took a similar approach by launching Nintendo Land as well as a Mario game — though we’re working on Zelda for Wii U, that’s going to take us a little big

Continue reading…

…read more
Source: FULL ARTICLE at IGN Video Games

Ecolab Schedules Webcast of Industry Conference for March 12

By Business Wirevia The Motley Fool

Filed under:

Ecolab Schedules Webcast of Industry Conference for March 12

ST. PAUL, Minn.–(BUSINESS WIRE)– Ecolab Inc.’s Chairman of the Board and Chief Executive Officer, Douglas M. Baker, Jr., will address financial analysts at the Credit Suisse 14th Annual Global Services Conference in Scottsdale, Ariz., on Tuesday, March 12. Ecolab will host a live webcast of Mr. Baker’s presentation. Details for the webcast are as follows:

     

TIME:

2:30 pm Eastern Time
 

DATE:

…read more
Source: FULL ARTICLE at DailyFinance

Utilities not dying after script run

By Marc G

Hi folks,

Friendly router geek wanting to be a programmer here…

So I worked with another guy here and came up with this to capture Unix admin data:

Code:

#!/bin/ksh
#
#
# Set Default Paths
#
PATH=/usr/apps/client/bin:$PATH; export PATH
LD_LIBRARY_PATH=/usr/apps/client/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
NOSHOME=/usr/apps/client/bin; export NOSHOME

# Execute the NOS provided top program with CPU MEMORY and LOAD values to be extracted to temporary files
#
$NOSHOME/top -d1 -q | /usr/bin/head -n 5 | /usr/bin/grep CPU | /usr/bin/awk -F"," '{print $1}' | /usr/bin/awk -F":" '{print $2}' | /usr/bin/awk -F" " '{print $1}' > /tmp/cpu.out
$NOSHOME/top -d1 -q | /usr/bin/head -n 5 | /usr/bin/grep Memory | /usr/bin/awk -F"," '{print $1,$2}' | /usr/bin/awk -F":" '{print $2}' | /usr/bin/awk -F" " '{print $1","$4}' > /tmp/mem.out
$NOSHOME/top -d1 -q | /usr/bin/head -n 5 | /usr/bin/grep Memory | /usr/bin/awk -F"," '{print $3,$4}' | /usr/bin/awk -F" " '{print $1","$4}' > /tmp/swap.out
$NOSHOME/top -d1 -q | /usr/bin/head -n 5 | /usr/bin/grep load | /usr/bin/awk -F";" '{print $2}' | /usr/bin/awk -F":" '{print $2}' | /usr/bin/sed 's/^[ ]*//;s/[ ]*$//' > /tmp/loadavg.out

# Gather all data into single file and clean up
#
CPU=`cat /tmp/cpu.out`
MEM=`cat /tmp/mem.out`
SWAP=`cat /tmp/swap.out`
LOAD=`cat /tmp/loadavg.out`
HOST=`/usr/bin/hostname`
DAY=`/usr/bin/date +%b-%d-%y`
TIME=`/usr/bin/date +%H:%M:%S`

# Configure date values to figure out proper storage of comma delimited values
#
typeset -i MONTH=`/usr/bin/date +%m`
MONTH=$(echo "$MONTH" | tr ' ')
typeset -i DAY=`/usr/bin/date +%d`
DAY=$(echo "$DAY" | tr ' ')
typeset -i YEAR=`/usr/bin/date +%Y`
YEAR=$(echo "$YEAR" | tr ' ')

# Create a variable FILE to concat variables into a single variable to test against
FILE=$MONTH"-"$YEAR-$HOST".dat"

# Check to see if file is empty. If not, populate the values, otherwise create the needed file and populate
#
if [ -e $NOSHOME/../data/OSKPI/$FILE ]
then
echo $HOST","$DAY","$TIME","$CPU","$MEM","$SWAP","$LOAD >> $NOSHOME/../data/OSKPI/$MONTH-$YEAR-$HOST.dat
else
echo $HOST","$DAY","$TIME","$CPU","$MEM","$SWAP","$LOAD > $NOSHOME/../data/OSKPI/$MONTH-$YEAR-$HOST.dat
fi

# Remove all temporary files and exit
#
rm /tmp/cpu.out /tmp/mem.out /tmp/swap.out /tmp/loadavg.out
exit 0


But once the script runs, it leaves processes still running as shown:

Code:

bash-3.00$ ps -efa | grep -v wrapper | grep -v oracle | grep -v java
.
.

.
root 11153 11098 0 07:00:04 ? 0:00 /usr/bin/sed s/^[ ]*//;s/[ ]*$//
root 19606 479 0 00:14:49 ? 0:00 /usr/lib/ssh/sshd
<font ...read more
Source: FULL ARTICLE at The UNIX and Linux Forums

'Zombie' Economics Have Eaten Rubio's Brains

By Kevin Spak Marco Rubio is undoubtedly a rising political star—heck, TIME anointed him the “Republican Savior” on a recent cover. “What we learned Tuesday, however, was that zombie economic ideas have eaten his brain,” writes Paul Krugman in the New York Times . A “zombie idea” is Krugman’s term for a theory… …read more
Source: FULL ARTICLE at Newser – Home

How to find the router reboot date using script?

By surender reddy

Hai

Iam having router output in a text file.from this data how to find out the router reboot date and time using script

HTML Code:

[local]bgl-ras-bng-bge-09>show version | grep Time
Router Up Time - 61 days, 21 hours 31 minutes 49 secs

[local]bgl-ras-bng-bge-09>show clock
Thu Feb 14 10:16:14 2013 IST


output date should come with below formula

HTML Code:

Thu Feb 14 10:16:14 2013 IST - 61 days, 21 hours 31 minutes 49 secs = ROUTER REBOOT DATE with TIME.


can any body help. tnx in advance.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Need Urgent Help from UNIX gurus to get specific data from a file

By zaq1xsw2

Hi,

I have a file monitor.txt as below…

Code:

# Times are converted to local time from GMT.
# Local Timezone: EST (GMT -05:00)

PARAM1
{
TIME 30;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
CC4 "xxxxx";
}
PARAM2
{
4061 : First Para
{
TIME 0;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
}
1 : Second para
{
TIME 20;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
}
2 : third para
{
TIME 20;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
}
3 : fourth para
{
TIME 20;
CC1 "xxxxx";
CC2 "xxxxx";
CC3 "xxxxx";
}
}


I need to write a code by which i will get an output like below:

Code:

4061 : First Para 0
1 : Second para 20
2 : third para 20
3 : fourth para 20


That means Headers and the time values of PARAM2

Thanks

Source: FULL ARTICLE at The UNIX and Linux Forums

SLIDESHOW: The Return of Mexico's Anti-Globalization Zapatista Rebel Army

By Nathaniel Parish Flannery, Contributor On an overcast day in late December 2012, several thousand masked men and women descended into San Cristobal, a mountain city in Chiapas, a rugged Mexican state that shares a southern border with Guatemala. A recent article from TIME magazine explains “tens of thousands of masked Zapatista rebels, all of them descendants of the ancient Maya, marched in silence through towns in Chiapas state in their most high-profile mobilization in five years.”
Source: FULL ARTICLE at Forbes Latest

Young Reporters Ask All the Right Questions About Helping Military Families

By Hannah August

Michelle Obama and Jill Biden with kid reporters, Jan. 18, 2013

First Lady Michelle Obama and Dr. Jill Biden are interviewed by young reporters during a kids magazine roundtable in the First Lady’s Office in the East Wing of the White House, Jan. 18, 2013.

(Official White House Photo by Sonya Hebert)

Yesterday, the First Lady and Dr. Biden sat down with four exceptional young reporters from kids’ magazines to talk about their initiative to support military families, Joining Forces. The reporters – from Highlights, National Geographic Kids, Scholastic and TIME for Kids – asked some great questions about the initiative and how kids can help!

Some of the takeaways?

  • Mrs. Obama and Dr. Biden talked about how they encourage all Americans to look for ways to honor and support military families, and Dr. Biden said when her son Beau was deployed their church put his name in the bulletin to pray for him, people brought meals over, and someone shoveled her daughter-in-law’s driveway during a snowstorm.
  • Asked about advice for a military child who moves a lot, Dr. Biden encouraged them to get involved in sports teams and school activities. And as a teacher herself, she talked about how teachers can get involved to reach out to military kids. For example, Dr. Biden’s granddaughters’ teacher put a picture of her dad’s unit outside of her classroom so the entire class would know Beau was deployed.
  • Mrs. Obama encouraged all the kids’ magazines’ readers to think “what can I do?” for a new kid in school – especially a new military kid.

read more

Source: FULL ARTICLE at The White House