Visit Our UNIX and Linux User Community


please help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers please help
# 1  
Old 11-05-2009
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

# 2  
Old 11-05-2009
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 ..
# 3  
Old 11-05-2009
What sort of post is this.Keep the forum rules in mind..

You should respect this forum and its members.
# 4  
Old 11-05-2009
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:
https://www.unix.com/unix-dummies-que...ut-scrypt.html
https://www.unix.com/unix-dummies-que...rypt-work.html

---------- Post updated at 17:13 ---------- Previous update was at 17:06 ----------

And so I will close the thread...
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #239
Difficulty: Easy
In March 1970, the ARPANET reached the East Coast of the United States, when an IMP at the Department of Energy in Washington, DC was connected to the network.
True or False?

Featured Tech Videos