Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Update text files in place (string substitution) ?? Post 4000 by Neo on Monday 16th of July 2001 11:11:45 PM
Old 07-17-2001
Lightbulb PERL

I've had to do similar things a number of times. Each time I use a simple one line PERL command.

I think an example is in the forums database and a key word search might find it. Here is one particular thread:

https://www.unix.com/showthread.php?t...l+command+line
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep a string from 2 text files

How to grep a string in two different files, I am having the following scenario TextFile1 Date (dd/mm)Time Server IP Error Code =========================================================================== 10/04/2008 10:10 ServerA xxx.xxx.xxx.xxx ... (15 Replies)
Discussion started by: karthikn7974
15 Replies

2. UNIX for Dummies Questions & Answers

String Search within Text Files

I have many scripts in directories and sub-directories that I would like to search for a specific string. How would I do that? (1 Reply)
Discussion started by: bggibson
1 Replies

3. Shell Programming and Scripting

How to insert a string in a file at specified place?

Hi all, I want to insert a string in a specified place of a very large file. I am giving an example of the task: I love football. Above is a sentence in a file and I want to insert a string "the" between love and football. It is not sure that where this particular line exists. It has to... (4 Replies)
Discussion started by: naw_deepak
4 Replies

4. Shell Programming and Scripting

Perl - Enter text in a file in a place.

Hi, I have a simple question: I need to enter some text in a text file at a certain place via perl. I would first need to find that specific text in the file and then I would like to insert a line after that particular line. Say I have this text file: I am a great Perl Programmer I... (1 Reply)
Discussion started by: som.nitk
1 Replies

5. Shell Programming and Scripting

Find a string and place two blank lines

Hi friends, I am looking for a line to find a particular string in my file and once found then replace with 2-3 blank lines before the string Example: aaa 11 bbb 1 2 3 aaa 22 bbb 4 5 6 Output (4 Replies)
Discussion started by: shaliniyadav
4 Replies

6. Shell Programming and Scripting

Take input from read and place it a string in another file

Hi, This is most likely a dumb question but I could not find answer to it elsewhere. I'm building a simple menu with case /esac and want to read user's input: Please enter XYZ ; read XYZ How do I take the value of XYZ and insert it as a variable $XYZ in file file.txt ? I may need to... (9 Replies)
Discussion started by: svetoslav_sj
9 Replies

7. Shell Programming and Scripting

Place , character after 3 digits from left to right in a string

Hi All, Could anyone please help me, how to put ‘,' character after 3 digits from right to left count,among 17 digits sting. unix scripting Example - I am having 12345678911234567 digits Accepted result-- 12,345,678,911,234,567 Note- 12345678911234567 digits will be dynamic at run time, I... (13 Replies)
Discussion started by: krupasindhu18
13 Replies

8. Shell Programming and Scripting

How to update field value in place?

Dear all: I have a file: 1:00 2:abc 3:12asweand I ran the following awk script on this file: #!/usr/bin/awk -f { i= 1; while(i<=NF) { $i=substr($i, 1, index($i, ":")-1); i++ } }I am expecting the file would become (after running... (7 Replies)
Discussion started by: littlewenwen
7 Replies

9. Shell Programming and Scripting

Cut text file in place

I have a file that i want to take only the first part of it and discard the rest, to be accurate,I need the first 137097 lines but I cant use split because I dont have enough space on my disck. I need sth to cut the file in its place (3 Replies)
Discussion started by: Heidi Heweidy
3 Replies

10. Shell Programming and Scripting

Need to merge multiple text files vertically and place comma between fields

Hello expert friends, I'm writing a script to capture stats using sar and stuck up at report generation. I have around 10 files in a directory and need to merge them all vertically based on the time value of first column (output file should have only one time value) and insert comma after... (6 Replies)
Discussion started by: prvnrk
6 Replies
EFIKEYGEN(1)						      General Commands Manual						      EFIKEYGEN(1)

NAME
efikeygen - command line tool for generating keys to use for PE image signing SYNOPSIS
efikeygen <[--ca | -C] [--self-sign | -S] | [--signer=nickname]> [--token=token | -t token] [--nickname=nickname | -n nickname] [--common-name=common name | -c common name] [--url=url | -u url] [--serial=serial | -s serial] DESCRIPTION
efikeygen is a command line tool for generating keys and certificates to be used with pesign. These are standard X.509 certificates, and can potentially be generated with any certificate creation tool. efikeygen simply sets generates keys with sensible options set for a key to be used for PE image signing. OPTIONS
--ca The certificate being generated is for a CA. --self-sign The generated certificate is to be self signed. --signer=nickname Nickname of certificate to be used to sign the generated certificate. --token=token Use the specified NSS token's certificate database. --nickname=nickname The nickname to use for the generated certificate. --common-name=common-name The X.509 Common Name for the generated certificate. This should be in rfc2253 syntax, i.e. "CN=John Doe,OU=editing,O=New York Times,L=New York,ST=NY,C=US" --url=url Informational url regarding objects signed with this key. --serial=serial number Serial number for use with this key. A certificate is identified by its signer and its serial number, so it's best not to ever re- use this value with the same signer. SEE ALSO
pesign(1) AUTHORS
Peter Jones Mon Jan 07 2013 EFIKEYGEN(1)
All times are GMT -4. The time now is 03:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy