![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| top output for six processes with the same name, output changed from column to row | Bloke | Shell Programming and Scripting | 5 | 06-04-2009 07:02 AM |
| capturing output from top and format output | new2ss | Shell Programming and Scripting | 4 | 02-24-2009 09:26 PM |
| "SCRYPT" command in RED HAT 9 | nsharath | Red Hat | 2 | 01-06-2009 11:50 AM |
| Expect - Interact output hangs when large output | natedog | Shell Programming and Scripting | 0 | 08-27-2008 12:21 PM |
| how to make a line BLINKING in output and also how to increase font size in output | mail2sant | Shell Programming and Scripting | 3 | 04-14-2008 08:30 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
what is output of this scrypt
hello every one i want to know how this scrypt work and what is the output Code:
if [ `uname` = SCO_SV ]
then
if [ "$TIME_SERVICE" = server ]
then
cp $ConfData/inf/ntp.conf /etc # ntp-Dateien nach
cp $ConfData/inf/ntp.keys /etc # /etc kopieren
chown bin /etc/ntp.conf /etc/ntp.keys # owner setzen
chgrp bin /etc/ntp.conf /etc/ntp.keys # group setzen
chmod 640 /etc/ntp.conf /etc/ntp.keys # Rechte setzen
File=/etc/inittab # Datei zum Bearbeiten
Search=Ntp.Cntl # String zum Suchen
if [ -n "`fgrep $Search $File`" ]
then
LineNr=`fgrep -n $Search $File |cut -d: -f1` # Zeilennummer ntp
Cmd="$LineNr s/^# //\nw\nq" # ed-Kommando
echo "$Cmd" | ed -s $File >/dev/null # ed-Aufruf
else
LineNr=`fgrep -n InfPmBoot $File | cut -d: -f1` # Zeilennummer
PmBoot
Line="pm:2:once:/sys/inf/InfPmCall /sys/inf/Ntp.Cntl stop"
Line="$Line >/dev/null 2>&1" # Zeile zum Einfuegen
Cmd="$LineNr a\n$Line\n.\nw\nq" # ed-Kommando
echo "$Cmd" | ed -s $File # ed-Aufruf
fi
else
# PMK ist Timeclient --> ntp-Dateien deaktivieren
if [ -f /etc/ntp.conf ] ; then mv /etc/ntp.conf /etc/ntp.conf.save ; fi
if [ -f /etc/ntp.keys ] ; then mv /etc/ntp.keys /etc/ntp.keys.save ; fi
fi
fi
Last edited by kaydream; 4 Weeks Ago at 11:58 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|