Sponsored Content
Top Forums Shell Programming and Scripting Help about comment verification Post 302885701 by learnbash on Tuesday 28th of January 2014 03:59:47 AM
Old 01-28-2014
Quote:
Originally Posted by balajesuri
Code:
if [ $(sed -n '40p' filename.txt | cut -c1) = '#' ]
then
    echo "commented"
else
    echo "not commented"
fi

If it is not commented then how we can check?

line is like that

Code:
05,35,50 * * * * /usr/local/scripts/my.sh

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

verification?

I'm really new at this and wondering how I would go about adding code to my script to verify that all records loaded successfully? (I am loading a file into a table) i'm using the Korn shell. I'm also having trouble verifying parts in the header as i do not really understand the header and... (3 Replies)
Discussion started by: sheranjem
3 Replies

2. Shell Programming and Scripting

SSH login verification

I need to write a script that check users authenting to a particular server ssh -l if sucessfull echo loggin sucess else echo login invalid Any Suggestions ? (4 Replies)
Discussion started by: sriram003
4 Replies

3. UNIX for Dummies Questions & Answers

Signiture verification failed

Hello, I am new to Solaris. I've installed Solaris 10.0 and trying to apply all patches. On Java Desktop, I've applied almost all patches but some of patches should be applied manually on the command line. The patches -should be applied manually on terminal- are downloaded by Sun Update... (1 Reply)
Discussion started by: XNOR
1 Replies

4. Programming

htable + verification

hello every body, I have to verifiy if the param_key is selectionned twice or more and to print only one occurence i'm using htable what's the good implementation to add to the code to verify this. code : { char *tmpStr = NULL; ght_iterator_t iterator_param; void... (0 Replies)
Discussion started by: kamel.seg
0 Replies

5. AIX

HACMP verification

Hi, every midnight hacmp verification is run automatically. clverify.log says there is no erro bu clutils.log says there is 1 error but when i look at the clverify.log no problem at all. Below is the output of the clverify.log what may be the cause of the error in the clutils.log file. Thanks,... (1 Reply)
Discussion started by: mmersoylu
1 Replies

6. Shell Programming and Scripting

Script Verification

Hi eveyone I am planning to use crontab to delete all files in my donwloads directory that are older than one hour I will be using crontab to run this script find /home/kee/downloads/* -daystart -mmin +59 -type f -name -exec rm -r {}\; could you please let me know if the above... (1 Reply)
Discussion started by: k33k00
1 Replies

7. Shell Programming and Scripting

Field verification script help

Hello again unix.com I need some help regarding a script. I have: function checkform ( form ) { if (form.pass.value.length < 6) { alert( "Error." ); form.pass.focus(); document.getElementById('pass').style.backgroundColor="#FFFFFF"; return... (2 Replies)
Discussion started by: galford
2 Replies

8. Solaris

Server login verification

Hi , How to ensure the server i logged in OS cluster ? Is there any command to verify that ? Regards, maddy (5 Replies)
Discussion started by: Maddy123
5 Replies

9. Programming

ECDSA verification

Using ECDSA, how do you verify integrity of Data (D), Given the value for the following: Random number (r) Signature (s) ECpublic Key (K) Thanks. (0 Replies)
Discussion started by: dragonpoint
0 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Can't get past google verification

Trying to register the Verification step is blocking me. I've allowed all the intrusive Google trackers and Java. Tried different browsers with no blocking. Nothing is working. Says: "Try again later Your computer maybe ... " What weird is in this forum section I can pass the recaptcha but in... (1 Reply)
Discussion started by: Unregistered
1 Replies
DebianNet(3pm)						     Linux Programmer's Manual						    DebianNet(3pm)

NAME
DebianNet.pm - create, remove, enable or disable entry in /etc/inetd.conf SYNOPSIS
require DebianNet; DebianNet::add_service($newentry, $group); DebianNet::remove_service($entry); DebianNet::enable_service($service, $pattern); DebianNet::disable_service($service, $pattern); DESCRIPTION
You can use the functions in DebianNet.pm to to add, remove, enable or disable entries in the /etc/inetd.conf file. After the /etc/inetd.conf file has been changed, a SIGHUP signal will be sent to the inetd process to make sure that inetd will use the new /etc/inetd.conf file. The functions can also be used to add entries that are commented out by default. They will be treated like normal entries. That also means that if you already have an entry that is commented out you can't add an entry for the same service without remov- ing the old one first. The DebianNet functions treat entries that are commented out by a single '#' character as entries that have been commented out by a user. It won't change such entries. For shell scripts you can also use the update-inetd command. See update-inetd(8) for further information. VARIABLES
$DebianNet::inetdcf = "FILENAME"; Use FILENAME instead of /etc/inetd.conf (e.g. for testing purposes). $DebianNet::sep = "#<off># "; "#<off># " will be used as the default comment characters. You can use this option to specify different comment characters. This is only necessary if you have to deal with two (or more) services of the same name. $DebianNet::multi = "true"; If you want to disable/remove more than one entry at a time you should use this option. If you try to remove more than one entry at a time without using this option the program will show a warning and asks the user if he want to continue. $DebianNet::verbose = "true"; Explain what is being done. FUNCTIONS
DebianNet::add_service($newentry, $group); Add $newentry to the group $group of the /etc/inetd.conf file. If the entry already exist it will be enabled (it will also detect entries with different program options). Using $group is optional (the default group is the group OTHER). If the group does not exist the entry will be placed at the end of the file. DebianNet::remove_service($entry); Remove $entry from /etc/inetd.conf . You can use a regular expression to remove the entry. DebianNet::enable_service($service, $pattern); Enable $service (e.g. "ftp") in /etc/inetd.conf . Using $pattern is optional. It can be used to select a service. You only need this option if you have two (or more) services of the same name. An example: you have three ftp entries in the /etc/inetd.conf file (all disabled by default) and you want to enable the entry which uses the wu-ftpd daemon. To do this, use the pattern "wu-ftpd" (or any other regular expression that matches this entry). DebianNet::disable_service($service, $pattern); Disable SERVICE (e.g. "ftp") in /etc/inetd.conf . Using $pattern is optional (see above). AUTHORS
Peter Tobias, <tobias@et-inf.fho-emden.de> Ian Jackson <iwj10@cus.cam.ac.uk> Linux 21 September 1995 DebianNet(3pm)
All times are GMT -4. The time now is 08:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy