Sponsored Content
Full Discussion: A simple shell question
Top Forums Shell Programming and Scripting A simple shell question Post 9705 by rwb1959 on Thursday 1st of November 2001 12:28:35 PM
Old 11-01-2001
Yes it should work with one caveat...

In your script, if the OS is not SunOS or HP-UX,
the $ref_ntp variable does not get set. You have no
default case to prevent further execution...


case $OS in
SunOS)
ref_ntp=/ref/ntp/SUN
;;
HP-UX)
ref_ntp=/ref/ntp/HP
;;
*)
echo "Unknown OS: $OS"
exit 2
;;
esac
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Simple Question

Friends, I did following exercise $ echo '' > test $ od -b test $ echo "">test $ od -b test $echo > test $od -b test Every time I got the following output 0000000 012 0000001 But 012 is octal value for new line character . Even though there is no apperent new line character... (6 Replies)
Discussion started by: j1yant
6 Replies

2. Shell Programming and Scripting

two simple question on shell scripts....

:D my first question is how can envoke filename expansion from within a shell script.. forinstance if i execute the script and it asks for a specific directory that i would like to cd to, how can i get the script to use the same file name expension as the command line.. my second question is how... (3 Replies)
Discussion started by: moxxx68
3 Replies

3. UNIX for Dummies Questions & Answers

Simple Question

Can anyone tell me if there is a way to remove the encryption from Data CDs by UNIX? Or does anyone know of a program that can remove the encryption? I would much appreciate it! Thanks, -Peaves (2 Replies)
Discussion started by: Peaves
2 Replies

4. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

5. Programming

Simple C question... Hopefully it's simple

Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies

6. Shell Programming and Scripting

Simple Question

If given some output such as: "I'm having a senior moment" How do you print the last six characters to the screen? I'm thinking with awk or sed but can't remember how. (1 Reply)
Discussion started by: stepnkev
1 Replies

7. Shell Programming and Scripting

Simple Shell Script Question.... [java related]

Hey guys! This is my first post, as im new here :S I have a simple problem for a big program. We have a .sh to install it, but when I run the .sh in terminal like i should, It says the class is not found. I believe it has to do with the syntax, as the person who made it is not a linux pro. I... (3 Replies)
Discussion started by: Drags111
3 Replies

8. UNIX for Dummies Questions & Answers

Simple Question

Hi Guys, I've been learning UNIX for the past couple of days and I came across this exercise, I can't get my head around it, so I would be ever so grateful if I could receive some sort of help or direction with this. Create a file with x amount of lines in it, the content of your choice. ... (3 Replies)
Discussion started by: aforball
3 Replies

9. Shell Programming and Scripting

Very simple question 2

Hey , another question is below: Administrator@fe038390aa60482 ~/Frank/20130509 $ c=`ls -ls` Administrator@fe038390aa60482 ~/Frank/20130509 $ echo $c Total 4 1 -rwxr--r-- 1 Administrator None 482 May 9 11:07 do_increment 1 -rwxr --r-- 1 Administrator None 272 May 9 11:32 do_square 1... (2 Replies)
Discussion started by: franksunnn
2 Replies

10. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
ntp.drift(4)						     Kernel Interfaces Manual						      ntp.drift(4)

NAME
ntp.drift - Network Time Protocol (NTP) drift file DESCRIPTION
When the NTP daemon (xntpd) is first started, it computes the error in the intrinsic frequency of the clock on the computer it is running on. This process usually takes about a day or two after the daemon is started to compute a good estimate of this (and it needs a good estimate to synchronize closely to its server). Once the initial value is computed, it will change only by relatively small amounts during the course of continued operation. The driftfile declaration should always be included in the ntp.conf file. This provides xntpd with complete path name to a file in which it can store the current value of the frequency error. That way, if the daemon is stopped and restarted, it can reinitialize itself to the previous estimate without spending time recomputing the frequency estimate. The ntp.drift file contains one line with the following format: freq_offset flag Specifies the nominal frequency offset. DO NOT modify this field. Specifies the method used to improve system clock accuracy. Specifies that xntpd runs a Phase-Locked Loop (PLL) algorithm to keep synchronized with other hosts. This is the default. Specifies the use of the PLL algorithm in the kernel. This requires the NTP_TIME kernel option. After the option is configured in the kernel, edit the ntp.drift file and change the flag value to 1. See System Administration for information on the NTP_TIME kernel option. FILES
Conventional name of the drift file RELATED INFORMATION
Commands: ntpdate(8), ntpq(8), xntpd(8), xntpdc(8) Files: ntp.conf(4) Network Administration, System Administration delim off ntp.drift(4)
All times are GMT -4. The time now is 12:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy