|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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 !! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
please help
please help to resolve the output of below scrypt
Code:
File=/etc/inittab
Search=Ntp.Cntl
if [ -n "`fgrep $Search $File`" ]
then
LineNr=`fgrep -n $Search $File |cut -d: -f1`
Cmd="$LineNr s/^# //\nw\nq"
echo "$Cmd" | ed -s $File >/dev/null
else
LineNr=`fgrep -n InfPmBoot $File | cut -d: -f1`
Line="pm:2:once:/sys/inf/InfPmCall /sys/inf/Ntp.Cntl stop"
Line="$Line >/dev/null 2>&1"
Cmd="$LineNr a\n$Line\n.\nw\nq"
echo "$Cmd" | ed -s $File
fi
|
| Sponsored Links | ||
|
|
|
|||
|
1. You should not just say please help.
2. What is the problem ? What do you want us to solve ? If you cannot take time to explain the problem, why we should spend time in solving the issue ? 3. You should be penalized by the moderators for doing like this .. |
|
||||
|
Bumping up posts or double posting is not permitted in these forums.
Please read the rules, which you agreed to when you registered, if you have not already done so. You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future Thank You. The UNIX and Linux Forums. For it does very much as a disguised bumping method, see: what is output of this scrypt how this scrypt work ---------- Post updated at 17:13 ---------- Previous update was at 17:06 ---------- And so I will close the thread... |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|