Sponsored Content
Full Discussion: Help with refining script
Top Forums Shell Programming and Scripting Help with refining script Post 302988950 by Don Cragun on Thursday 5th of January 2017 02:05:53 PM
Old 01-05-2017
Please start a new thread to discuss a new topic (such as your new script) instead of just using one thread to discuss several topics. (Using a single thread makes it hard for readers to figure out to which topic future posts refer.)

And, please, when showing sample input and sample output, make the sample output be output that you want to produce when given the sample input you showed earlier. I don't see any clear way to transform input data for a show named Deep Throat into output for a show named ShadowHunters and assume that is not what you expect your script to do. With the examples you provided in post #13 we have no way to determine whether output fields like major_brand=qt and compatible_brands=qt are constants to be provided by the conversion process or are derived from data present in some input but not provided in others.

Please do not continue discussion on post #13 in this thread!
These 2 Users Gave Thanks to Don Cragun For This Post:
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

2. Shell Programming and Scripting

Refining if loops using sed/awk

hi All, I have the following two requirements: case 1: In a file i have the below code: if ((a>b)) a=b; else a = c; by using some means i need to convert the line to the following output: Output required: case 2: In a file i have the below code: if (a>b) a=b; else a... (4 Replies)
Discussion started by: engineer
4 Replies

3. Shell Programming and Scripting

SOLVED: Refining an awk command

I have a file (file1) with in the below format ST*820*212121 BPR*C*213212.20*C*212*CCD*01***01*071000013*DA*321321*101208 TRN*1*21321321*13213 N1*PR*3232. dff. SYS.*91*3232 ENT*1 N1*PE* 2132121321 RMR*TN*234456677888**192387.20*192387.20 REF*IV*234456677888*213213 3213 UNI... (0 Replies)
Discussion started by: Muthuraj K
0 Replies

4. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

5. UNIX for Dummies Questions & Answers

Calling a script from master script to get value from called script

I am trying to call a script(callingscript.sh) from a master script(masterscript.sh) to get string type value from calling script to master script. I have used scripts mentioned below. #masterscript.sh ./callingscript.sh echo $fileExist #callingscript.sh echo "The script is called"... (2 Replies)
Discussion started by: Raj Roy
2 Replies

6. Shell Programming and Scripting

Shell script works fine as a standalone script but not as part of a bigger script

Hello all, I am facing a weird issue while executing a code below - #!/bin/bash cd /wload/baot/home/baotasa0/sandboxes_finance/ext_ukba_bde/pset sh UKBA_publish.sh UKBA 28082015 3 if then echo "Param file conversion for all the areas are completed, please check in your home directory"... (2 Replies)
Discussion started by: ektubbe
2 Replies

7. Shell Programming and Scripting

How to block first bash script until second bash script script launches web server/site?

I'm new to utilities like socat and netcat and I'm not clear if they will do what I need. I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes. I'm using Cygwin bash on Windows 10. My... (3 Replies)
Discussion started by: siegfried
3 Replies
Net::LDAP::Control::PostRead(3) 			User Contributed Perl Documentation			   Net::LDAP::Control::PostRead(3)

NAME
Net::LDAP::Control::PostRead - LDAPv3 Post-Read control object SYNOPSIS
use Net::LDAP; use Net::LDAP::Control::PostRead; use Net::LDAP::Constant qw( LDAP_CONTROL_POSTREAD LDAP_SUCCESS ); $ldap = Net::LDAP->new( "ldap.mydomain.eg" ); $postread = Net::LDAP::Control::PostRead->new( attrs => [ qw/givenName/ ] ); my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US", replace => { givenName => "Babs" }, control => $postread ); if ($mesg->code eq LDAP_SUCCESS) { my ($afterwards) = $mesg->control( LDAP_CONTROL_PREREAD ); my $entry = $afterwards ? $afterwards->entry() : undef; if ($entry) { print "givenName changed to '" . join("', '", $entry->get_value(givenName") . "' to 'Babs' "); } } DESCRIPTION
"Net::LDAP::Control::PostRead" provides an interface for the creation and manipulation of objects that represent the "Post-Read Controls" as described by RFC 4527. In modification operations, the "Post-Read request control" indicates to the server that a copy of the modified entry after the update is to be returned. After the successful completion of the operation, the accompanying "Post-Read response control" allows one to retrieve the updated value from the server's response. One use case of this control may be to obtain values of operational attributes, such as the "entryUUID" and "modifyTimestamp" attributes, updated by the server as part of the update operation. CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided. attrs => [ ATTR, ... ] A list of attributes to be returned in the entry returned in the response control. If absent, all attributes are returned. Operational attributes may be included in the list by explicitly asking for them or by using special "+" feature (provided the server supports this feature). METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument. In addition to these methods, the control also supports the following method: entry () Returns the entry from the response control in the response message to the LDAP request that contained the request control. The result is either a Net::LDAP::Entry object or undefined. SEE ALSO
Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4527.txt AUTHOR
Peter Marschall <peter@adpm.de> Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org> COPYRIGHT
Copyright (c) 2008,2011 Peter Marschall. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-07-21 Net::LDAP::Control::PostRead(3)
All times are GMT -4. The time now is 01:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy