11-07-2013
Quote:
Originally Posted by
prvnrk
Fantastic, Thanks Don! Worked like charm!!
How could you offer the solution so quickly? Please suggest how can I easily learn about awk and sed?
![Smilie Smilie](https://www.unix.com/images/smilies/smile.gif)
Given your problem statement (with the restrictions I stated in my response), it just seemed obvious to me how to do it.
Look at examples posted here in The UNIX and Linux Forums and figure out what the scripts do. If you can't figure out how they work, ask questions.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am new to unix and I need help in solving below mentioned issue, really appreciate ur help.
I have a file
sam, john, 2324, 07142007
tom, thomson, 2343, 07142007
john, scott, 2478, 07142007
its a comma delimited file, I need to extract the last column from each line and this... (4 Replies)
Discussion started by: vukkusila
4 Replies
2. Shell Programming and Scripting
Hi All,
Below is the sample data of my files:
O|A|571000689|D|S|PNH|S|SI
sadm|ibscml1x|
I|A|571000689|P|S|PNH|S|SI
sadm|ibscml1x|
O|A|571000689|V|S|PNH|S|SI
sadm|ibscml1x|
S|C|CAM|D|S|PNH|R|ZOA|2004
bscml1x| ... (3 Replies)
Discussion started by: selamba_warrior
3 Replies
3. Shell Programming and Scripting
Hi Friends,
I have a file with the following values..
xyz.txt,12345.xml
abc.txt,04567.xml
cde.txt,12134.xml
I would like to extract all the 2nd column values twice as shown in the example like
12345,12345.xml
04567,04567.xml
12134,12134.xml
Please advice!!
In the formus one of... (7 Replies)
Discussion started by: techmoris
7 Replies
4. UNIX for Dummies Questions & Answers
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Discussion started by: sushant172
4 Replies
5. Shell Programming and Scripting
Hi everybody
I have some problems with PERL programming.
I have a file with two columns, both with numeric values.
I have to extract the values > 50 from the 2nd columns and sum them among them.
The I have to sum the respective values in the first column on the same line and, at the end, I... (6 Replies)
Discussion started by: m_elena
6 Replies
6. Shell Programming and Scripting
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Discussion started by: Diya123
1 Replies
7. Shell Programming and Scripting
Hello All,
Could you please help with this.
This is what I have:
506234.222 2
506234.222 2
506234.222 2
506234.222 2
508212.200 2
508212.200 2
333456.111 2
333456.111 2
333456.111 2
333456.111 2
But this is what I want:
506234.222 1
506234.222 2
506234.222 2
506234.222 3 (5 Replies)
Discussion started by: canimba
5 Replies
8. Shell Programming and Scripting
Hi all:
quick question!
I have the following data that resembles some thing like this:
i am tired
tired am i
what is up
hello people cool
I want to count (or at least isolate) all of the unique elements in the 2nd column.
I have tried this:
cut -f 2 | uniq 'input'
which does... (3 Replies)
Discussion started by: owwow14
3 Replies
9. Shell Programming and Scripting
File2 is tab-delimeted and I am trying to use $2 in file1 (space delimeted) as a search term in file2. If it is found then the AF= in and the FDP= values from file2 are extracted and printed next to the file1 line. I commented the awk before I added the lines in bold the current output resulted. I... (7 Replies)
Discussion started by: cmccabe
7 Replies
10. Shell Programming and Scripting
In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT XFREE86
genlib_unflatten_lofig
GENLIB_UNFLATTEN_LOFIG.3(October 1, 1997) GENLIB_UNFLATTEN_LOFIG.3(October 1, 1997)
NAME
UNFLATTEN_LOFIG - creates a hierarchy level from instances in the current logical figure
SYNOPSYS
#include <genlib.h>
void GENLIB_UNFLATTEN_LOFIG(figurename, instancename, list_of_instances, 0)
char *figurename;
char *instancename;
char *list_of_instances;
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
PARAMETERS
figurename Name of the figure of the new hierarchy to be created
instancename Name to be given at the instanciation of figurename into the current structual figure
list_of_instances List of strings representing the instances to be inserted into the new figure
DESCRIPTION
UNFLATTEN_LOFIG creates a new level of hierarchy, whose model name will be figurename, and instanciate it under the name instancename in
the current figure. The instances whose name belong to the list_of_instances parameters are added in the new figure, and destroyed from
the current figure.
EXAMPLE
#include <genlib.h>
main()
{
/* Create a figure to work on */
GENLIB_DEF_LOFIG("mycell");
.
.
.
/* Place an instance */
GENLIB_LOINS("model","instance", "sig1", "sig2", EOL);
/* flatten an instance */
GENLIB_UNFLATTEN_LOFIG("newfig", "newins", "instance", ..., 0);
/* Save all that on disk */
GENLIB_SAVE_LOFIG();
}
SEE ALSO
genlib(1), GENLIB_FLATTEN_LOFIG(3).
BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
PROCEDURAL GENERATION LANGUAGE
ASIM/LIP6 GENLIB_UNFLATTEN_LOFIG.3(October 1, 1997)