Sponsored Content
Top Forums Shell Programming and Scripting How to replicated records using sed Post 302257545 by Russ on Wednesday 12th of November 2008 12:28:19 PM
Old 11-12-2008
How to replicated records using sed

I need to generate exactly 102 duplicates in a file using sed.

Here's an example of my input:
Grid-ref = 1, 148
Grid-ref = 1, 311
Grid-ref = 1, 428


I need:
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
... repeated 102 times, then
Grid-ref = 1, 311
Grid-ref = 1, 311
Grid-ref = 1, 311
... repeated 102 times, then record 3, etc.

Any ideas using either sed (preferably), awk or ksh?

thanks
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to delimit a flat file with records with SED

Hi gurus, hoping someone can help with a sed line that can do the following... I have a flat file with about 1000 records, but in order to import into openoffice spreadsheet, I need to create a delimited file. I'd like to do 2 things with the SED command: 1- add a pipe character "|" at the end... (4 Replies)
Discussion started by: RogCor
4 Replies

2. UNIX for Dummies Questions & Answers

logging deleted records by sed

Hi, I want to use the sed command to delete some lines in a file and I was wondering whether there is a possibility of knowing which lines are deleted, or at least which line numbers. Thanks (4 Replies)
Discussion started by: vanagreg
4 Replies

3. Shell Programming and Scripting

deleting text records with sed (sed paragraphs)

Hi all, First off, Thank you all for the knowledge I have gleaned from this site! Deleting Records from a text file... sed paragraphs The following code works nearly perfect, however each time it is run on the log file it adds a newline at the head of the file, run it 5 times, it'll have 5... (1 Reply)
Discussion started by: Festus Hagen
1 Replies

4. Shell Programming and Scripting

Finding some records with sed command

Hi for all! sorry guys for my dumb question, but I'm really need help so, we have file with many many fields, like this one: 201001002359 blablabla 87654321 201001002359 123,56 77272588300 blablabla/123 91823778544and I wrote awk command awk '{if($6~/(2588300|2580000|2587021)$/)print}'so,... (8 Replies)
Discussion started by: shizik
8 Replies

5. UNIX for Dummies Questions & Answers

Turning to SED to select specific records

Hi All, I am looking for a simple concise solution most likely using sed to process the following 4 rows of data from the same record and only keeps it if the second record satisfy certain critea such as surname matches up to smith or jackson: John (firstname) Smith (surname) ... (21 Replies)
Discussion started by: gjackson123
21 Replies

6. Shell Programming and Scripting

Display records between two search strings using sed

I have input file like AAA AAA CCC CCC CCC EEE EEE EEE EEE FFF FFF GGG GGG i was trying to retrieve data between two strings using sed. sed -n /CCC/,/FFF/p input_file Am getting output like CCC CCC CCC (1 Reply)
Discussion started by: NareshN
1 Replies

7. Shell Programming and Scripting

Preventing script from being replicated on a defined number of hosts

ok. i have an extensive program written predominantly in borne shell. i have to give an "evaluation" copy of this program to a user so she can test it out and see if she wants it. problem is, i dont have an evaluation copy. and even if i did, im worried the evaluation copy can be edited to... (8 Replies)
Discussion started by: SkySmart
8 Replies

8. Solaris

Working with disk sets from replicated LUNs

Hi everybody We have a Sun Cluster with two nodes, connected to a number of SAN disks over fiber cables. We made SVM disk sets on those disks for our application needs. Now we constructed another site in another metropolitan area, but with only one node (no cluster), and connected it to the main... (2 Replies)
Discussion started by: abohmeed
2 Replies

9. Shell Programming and Scripting

Format data by consolidating replicated obs

Please assist with the following. I have readings R1, R2,..Rn from plants from different fields , sometimes replicated. I need to first consolidate the replicates by their mean value per plant per field. Then I need to reformat the data by partially transposing it. The missing values... (3 Replies)
Discussion started by: jianp83
3 Replies
GLOBUS-K5(8)							  Globus Toolkit						      GLOBUS-K5(8)

NAME
globus-k5 - Acquire Kerberos Credentials for use with Grid Services SYNOPSIS
globus-k5 SERVICE-COMMAND [SERVICE-ARGS...] DESCRIPTION
The globus-k5 program is an authorization module used by the globus-gatekeeper program to acquire Kerberos 5 Credentials prior to executing a Grid Service. This may be accomplished by running kinit with a password stored in the globuskmap file, using the NCSA krb525 command, or the sslk5 command to use the X509 user proxy. The arguments passed to globus-k5 will not be used by it, but will be passed onto the job manager. The first parameter must be the path to the Grid Service. It is expected that the environment will contain the variables GLOBUSID and USER for the Grid and local POSIX user identities. This program is normally run as root, and will call seteuid() prior to executing the Grid Service. The parameters to use and the mapping for the globus to K5 user are located in the globuskmap file. FORMAT OF THE GLOBUSKMAP FILE
The globuskmap file is a line-oriented file which each line containing a command to run to acquire Kerberos 5 credentials for a Grid identity. Each line consists of an optionally-quoted GLOBUSID value followed by a command-line for running a process to acquire a Kerberos credential. For example: "/O=Example/OU=Grid/CN=Joe User" /usr/afsws/bin/klog -principal juser -password mypasswd -cell infn.it ENVIRONMENT
If the following variables affect the execution of globus-k5: GLOBUSKMAP Path to the globuskmap file. USER POSIX username that the service will run as. KRB5CCNAME Path to a Kerberos credential cache. GLOBUS_ID Grid identity to generate Kerberos credentials for. FILES
/etc/globuskmap Default file mapping Grid identities to Kerberos 5 principals. SEE ALSO
globus-k5(8), globus-job-manager(8) University of Chicago 01/06/2012 GLOBUS-K5(8)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy