Sponsored Content
Top Forums Shell Programming and Scripting Help required in searching of pattern. Post 302886556 by learnbash on Saturday 1st of February 2014 03:38:31 PM
Old 02-01-2014
Thanks Don.....

I need one more help, how to change the ip address of domain name. It only change to below domain not disturb sub-domain or any other thing.

current output

Code:
abcd.com.               400     IN      A       15.1.1.1

server.abcd.com      400      IN      A       151.100.151.100

Desired output

Code:
abcd.com.               400     IN      A       15.1.1.10

server.abcd.com      400      IN      A       151.100.151.200

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regarding Searching Pattern

Hi Guys, Can you help with the shell script: I would like to search a fixed width pattern from a file say for each line from a fixed position and lenght it has to return all rows from the file. Example: To search the third column for "def" it has to return 1 and 4th rows only ... (2 Replies)
Discussion started by: sbasetty
2 Replies

2. Shell Programming and Scripting

Pattern searching pattern in c files

I have a problem in searching a specific pattern in c files. My requirement: I have to find all the division operator in all cfiles. The problem is, the multi line comments and single line comments will also have forward slash in it. Even after avoiding these comments also, if both... (6 Replies)
Discussion started by: murthybptl
6 Replies

3. Shell Programming and Scripting

searching for a pattern

can anybode tell me ? I want to search for a pattern present in a whole directory and subdirectories's files containg " crat" I tried grep -r "crat" */* ; is it right ? (3 Replies)
Discussion started by: pranabrana
3 Replies

4. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

5. Shell Programming and Scripting

Searching using awk - Help required

Hi... I am working on script to search some records in a file based on certain fields and each record is a ASCII fixed size. I was using awk to search based on certain condition. But the length of the record is too much that awk is giving syntax error near unexpected token `(' Request... (5 Replies)
Discussion started by: ysrikanth
5 Replies

6. Shell Programming and Scripting

Find required files by pattern in xml files and the change the pattern on Linux

Hello, I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found. For instance. I can start the script with arguments for keyword and for value, i.e script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies

7. UNIX for Dummies Questions & Answers

Pattern searching

Hi, I need small help from you people. In a directory there are around 150 odd files and few them contain the word "TRACK" and few are not. How can I find out the the list of those files which doesn't contain the word "TRACK"? Thanks, Siba (4 Replies)
Discussion started by: siba.s.nayak
4 Replies

8. UNIX for Dummies Questions & Answers

searching pattern in VI

in my file i have somthing likre kpk_12 kpk_1 kpk_1.tcl kpk_3.tcl kpk kpk kpk i want search only kpk i am using this cmd /kpk ...results it is showing all . any cmd is ther other then this to search exactword in this example kpk it shoulsnot show kpk_* etc Thanks in Advance ... (2 Replies)
Discussion started by: prakumar
2 Replies

9. Shell Programming and Scripting

Searching for a pattern and extracting records related to that pattern

Hi there, Looking forward to your advice for the below: I have a file which contains 2 paragraphs related to a particular pattern. I have to search for those paragraphs from a log file and then print a particular line from those paragraphs. Sample: I have one file with the fixed... (3 Replies)
Discussion started by: danish0909
3 Replies

10. Shell Programming and Scripting

Searching and printing only required pattern

Hi all, i am trying to count the number of logical processors from the below output: # print_manifest | grep "logical processors" 8 cores, 16 logical processors per socket 2 logical processors (2 per socket) i just want to have below output : 16 2 also... (11 Replies)
Discussion started by: omkar.jadhav
11 Replies
Vend::Ship::QueryUPS(3pm)				User Contributed Perl Documentation				 Vend::Ship::QueryUPS(3pm)

NAME
Vend::Ship::QueryUPS -- calculate UPS costs via www SYNOPSIS
(catalog.cfg) Shipping QueryUPS default_geo 45056 (shipping.asc) ground: UPS Ground Commercial origin 45056 service GNDCOM min 0 max 0 cost e Nothing to ship! min 0 max 150 cost s QueryUPS min 150 max 99999999 cost e Too heavy for UPS. DESCRIPTION
Calculates UPS costs via the WWW using Business::UPS. To activate, configure any parameter in catalog.cfg. A good choice is the default origin zip. Options: weight Weight in pounds. Required -- normally passed via CRIT parameter. service Any valid Business::UPS mode (required). Example: 1DA,2DA,GNDCOM. Defaults to the mode name. geo Location of field containing zip code. Default is 'zip'. country_field Location of field containing country code. Default is 'country'. default_geo The ZIP code to use if none supplied -- for defaulting shipping to some value in absence of ZIP. No default -- will return 0 and error if no zip. default_country The country code to use if none supplied -- for defaulting shipping to some value in absence of country. Default US. aggregate If 1, aggregates by a call to weight=150 (or $Variable->{UPS_QUERY_MODULO}). Multiplies that times number necessary, then runs a call for the remainder. In other words: [ups-query weight=400 mode=GNDCOM aggregate=1] is equivalent to: [calc] [ups-query weight=150 mode=GNDCOM] + [ups-query weight=150 mode=GNDCOM] + [ups-query weight=100 mode=GNDCOM]; [/calc] If set to a number above 1, will be the modulo to do repeated calls by. So: [ups-query weight=400 mode=GNDCOM aggregate=100] is equivalent to: [calc] [ups-query weight=100 mode=GNDCOM] + [ups-query weight=100 mode=GNDCOM] + [ups-query weight=100 mode=GNDCOM] + [ups-query weight=100 mode=GNDCOM]; [/calc] To aggregate by 1, use .999999. cache_table Set to the name of a table (default ups_cache) which can cache the calls so repeated calls for the same values will not require repeated calls to UPS. Table needs to be set up with: Database ups_cache ship/ups_cache.txt __SQLDSN__ Database ups_cache AUTO_SEQUENCE ups_cache_seq Database ups_cache DEFAULT_TYPE varchar(12) Database ups_cache INDEX weight origin zip shipmode country And have the fields: code weight origin zip country shipmode cost updated Typical cached data will be like: code weight origin zip country shipmode cost updated 14 11 45056 99501 US 2DA 35.14 1052704130 15 11 45056 99501 US 1DA 57.78 1052704130 16 11 45056 99501 US 2DA 35.14 1052704132 17 11 45056 99501 US 1DA 57.78 1052704133 Cache expires in one day. perl v5.14.2 2010-03-25 Vend::Ship::QueryUPS(3pm)
All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy