Sponsored Content
Full Discussion: Simple? Search replace
Top Forums UNIX for Dummies Questions & Answers Simple? Search replace Post 46427 by Brandt on Thursday 15th of January 2004 04:21:09 PM
Old 01-15-2004
thanks, this has been really helpful, but i need to run this on several files that have >1000000 records, which i can break down into smaller files if need be (migrating data in case you haven't guessed), hence the reason i was trying to find a one time fell swoop, the solution you provided is much better than me scrolling for ^M and hitting Shft-J five or six times, but also doesn't lend itself to being run unattended, do you know of a way to peform the same task with sed?

if not, the help you have given me has been great, and i appreciate your quick responses.

thanks again
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Simple Search and Replace - Revisited

I have a ascii file with lines like this: 240|^M\ ^M\^M\ Old Port Marketing order recd $62,664.- to ship 6/22/99^M\ when this record gets loaded into my database, the \ is stored literally and so the user sees carriage return \ (hex 0D 5C) when what i need is carriage return line feed (hex 0D... (1 Reply)
Discussion started by: Brandt
1 Replies

2. UNIX for Dummies Questions & Answers

Too simple to search for

Hey. I'm just getting started with scripting and although i will admit i haven't searched the forum yet, i think it would be a waste of time. It really will be very simple. I want to enter a list of arguments after my script with the last being the filename. (not the first, as this is part of... (3 Replies)
Discussion started by: spudtheimpaler
3 Replies

3. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

4. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

5. UNIX for Dummies Questions & Answers

Simple search pattern help

Hi I need to define a pattern that will match an open square bracket, a series of numbers fro 1 to 4 digits in length and a close square bracket. Examples of the numbers I will need to find are: or or or I am using BBEdit to search, and BBEdit uses the standard GREP search... (1 Reply)
Discussion started by: alisamii
1 Replies

6. Shell Programming and Scripting

Simple (not for me) string search script

hi there, I am a complete newb to bash but am going to try and make a script to help me seach text files for strings of interest, any help that one of you gurus could pass on will be greatly received!! I want to write something like: in "text1.txt" find "string1" and copy out the line... (7 Replies)
Discussion started by: jumbo999
7 Replies

7. Shell Programming and Scripting

How to do a simple awk search?

Hello I am trying to do global search on access log files for a date and for either 'Error|error' string ls -lrt *access* | grep "Sep 23" | awk '{print $9}'|xargs awk '/23\/Sep\/2011/ && /Error/ || /error' Above matches All lines with 'error' as well unfortunately. Is there a... (6 Replies)
Discussion started by: delphys
6 Replies

8. Shell Programming and Scripting

Simple awk search problem

Hello; we have : awk '/reg_exp/,0/ prints every line after the first occurrence of "reg_exp" But if I want to print rest of the lines AFTER the last occurrence of "reg_exp", how would I do it ?? Tried : awk ' ! (/reg_exp/,0)' But it errored... Thank you for any... (5 Replies)
Discussion started by: delphys
5 Replies

9. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
ipsec_migrate(1M)														 ipsec_migrate(1M)

NAME
ipsec_migrate - HP-UX IPSec configuration file migration tool SYNOPSIS
DESCRIPTION
is a utility for migrating HP-UX IPSec configuration files to the current version. The utility stores backup copies of the following files in the directory before converting them: If the certificate data files and exist on the system, prompts for the HP-UX IPSec password and uses the password to decrypt the certifi- cate data files. The utility then converts and stores the certificate data in new files under the directory. requires the optional HP-UX IPSec software. Migrating HP-UX IPSec version A.02.01 to version A.03.00 The utility performs the following tasks when migrating configuration data from HP-UX IPSec version A.02.01 to version A.03.00: o Converts policies to policy objects. The utility ignores the IKE authentication value in policies. IKEv1 policies do not include a value for the IKE authentica- tion method. The IKE authentication method is specified in authentication records using the and arguments. The converts the value to a value for perfect forward secrecy IKEv1 policies do not include a value for maximum quick modes. If the value is 1, creates an policy with If the value is greater than 1, creates an IKEv1 policy with Note: Do not enable IKEv1 PFS with a system using an HP-UX IPSec release prior to A.03.00. The converts values in the hash field to IKE DES encryption is obsolete. o Adds a priority value to authentication records. The utility sorts existing authentication records using the address prefix length (longest to shortest). The migration utility sets the priority for the first record to the value of the priority parameter value in the AuthPolicy-Defaults section of the HP-UX IPSec profile file; the default priority value is 10. The utility increments the priority value for each subsequent record by the priority value. o Replaces DES transforms and nested transforms in host and tunnel policies with the default actions in the file. For host poli- cies, the default action is For tunnel policies, the default action is the transform. o If the and files exist, the extracts and converts the private key, local certificate, and CA certificate from these files and stores them in new files under the directory. o If the file exists, creates a softlink to the file. The file is a script that retrieves the CRL from an LDAP directory and can be executed from a cron job. RETURN VALUE
Upon successful completion, returns 0; otherwise it returns 1. ERRORS
fails if any of the following conditions is encountered: o Command used incorrectly - Usage message is returned. o The user is not the superuser. o The file specified in the option does not exist. o The file specified in the option is not a regular file. o The file specified in the option is not readable. o The file specified in the option is not an valid configuration file. o The file specified in the option exists. o The file is missing or corrupted. o Based on the information in cannot build a valid set of transformations to transform the file specified in the option to the file specified in the option. WARNINGS
requires the optional HP-UX IPSec software. AUTHOR
was developed by HP. FILES
SEE ALSO ipsec_config(1M), ipsec_config_add(1M), ipsec_config_batch(1M), ipsec_config_delete(1M), ipsec_config_export(1M), ipsec_con- fig_show(1M), ipsec_policy(1M), ipsec_report(1M). HP-UX IPSec Software Required ipsec_migrate(1M)
All times are GMT -4. The time now is 06:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy