search for key word and execute


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting search for key word and execute
# 15  
Old 04-20-2009
found the cause, it was due to missing space right after the "[" for "IF" condition.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to search for a word in column header that fully matches the word not partially in awk?

I have a multicolumn text file with header in the first row like this The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach for ii in ${hdr} do gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies

2. Shell Programming and Scripting

How do i replace a word ending with "key" using awk excpet for one word?

echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} | awk 'gsub(/^|abc,|$/,"") {print}' Required output {grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies

3. Shell Programming and Scripting

Shell Script @ Find a key word and If the key word matches then replace next 7 lines only

Hi All, I have a XML file which is looks like as below. <<please see the attachment >> <?xml version="1.0" encoding="UTF-8"?> <esites> <esite> <name>XXX.com</name> <storeId>10001</storeId> <module> ... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies

4. Shell Programming and Scripting

Perl - start search by using search button or by pressing the enter key

#Build label and text box $main->Label( -text => "Input string below:" )->pack(); $main->Entry( -textvariable => \$text456 )->pack(); $main->Button( -text => "Search", -command => sub { errchk ($text456) ... (4 Replies)
Discussion started by: popeye
4 Replies

5. Shell Programming and Scripting

Search for the word and exporting 35 characters after that word using shell script

I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word "description" excluding weird characters like $&lmp and without html tags in the new file output.txt. Help me. Thanx in advance. I have attached the input... (4 Replies)
Discussion started by: sachit adhikari
4 Replies

6. Shell Programming and Scripting

Search for the word and exporting 35 characters after that word using shell script?

I have a file input.txt which have loads of weird characters, html tags and useful materials. I want to display 35 characters after the word description excluding weird characters like $$#$#@$#@***$# and without html tags in the new file output.txt. Help me. Thanx in advance. My final goal is to... (11 Replies)
Discussion started by: sachit adhikari
11 Replies

7. UNIX for Dummies Questions & Answers

Script to search for a particular word in files and print the word and path name

Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name". Thanks for the reply in adv,:) (3 Replies)
Discussion started by: virtual_45
3 Replies

8. Shell Programming and Scripting

Search the word to be deleted and delete lines above this word starting from P1 to P3

Hi, I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this: Records P1 10,23423432 ,77:1 ,234:2 P2 10,9089004 ,77:1 ,234:2 ,87:123 ,9898:2 P3 456456 P1 :123,456456546 P2 abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies

9. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

10. Shell Programming and Scripting

Help adding a key word search to my script

Hello: I need help adding a key word search to my bash script. I have the following script. My boss whats the user to be able to add a search word e.g. unknown failures for the script to search the logs through and find the instances. I had originally done it so it grepped for unknown... (8 Replies)
Discussion started by: taekwondo
8 Replies
Login or Register to Ask a Question
nsd-checkconf(8)                                                    nsd 3.2.12                                                    nsd-checkconf(8)

NAME
nsd-checkconf - NSD configuration file checker. SYNOPSIS
nsd-checkconf [-v] [-h] [-o option] [-z zonename] [-s keyname] configfile DESCRIPTION
nsd-checkconf reads a configuration file. It prints parse errors to standard error, and performs additional checks on the contents. The configfile format is described in nsd.conf(5). The utility of this program is to check a config file for errors before using it in nsd(8) or zonec(8). This program can also be used for shell scripts to access the nsd config file, using the -o and -z options. OPTIONS
-v After reading print the options to standard output in configfile format. Without this option, only success or parse errors are reported. -h Print usage help information and exit. -o option Return only this option from the config file. This option can to be used in conjunction with the -z option. The special value zones prints out a list of configured zones. This option is primarily used by nsdc to parse the config file from the shell. If the -z option is given, but the -o option is not given, nothing is printed. -s keyname Prints the key secret (base64 blob) configured for this key in the config file. Used to help shell scripts parse the config file. -z zonename Return the option specified with -o for zone 'zonename'. If this option is not given, the server section of the config file is used. This option is primarily used by nsdc to parse the con- fig file from the shell. The -o, -s and -z option print configfile options to standard output. FILES
/etc/nsd3/nsd.conf default NSD configuration file SEE ALSO
nsd(8), nsdc(8), nsd.conf(5), nsd-notify(8), nsd-patch(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. NLnet Labs jul 19, 2012 nsd-checkconf(8)