-1

I want to write a shell script for getting NTP(Network Time Protocol) info for debian server.

How can I write, I don't know ?

volkan
  • 209
  • 4
  • 12
  • 1
    what are you trying to do: print out the time given by a remote server, or set the current machine's time with NTP? – Mat Jun 07 '11 at 16:27

2 Answers2

1

Why are you writing your own? There are lots of existing tools to do this. openntp is one example. Look in aptitude.

Is there a reason you can't use the existing tools?

Daenyth
  • 35,856
  • 13
  • 85
  • 124
  • Not course work, I send this info to campfire message.It's for integration.Only I need NTP time info for server. – volkan Jun 08 '11 at 07:30
0

You probably want to take a look at ntpdate manpage for details on how to use this command.

njzk2
  • 38,969
  • 7
  • 69
  • 107