Sponsored Content
Top Forums Shell Programming and Scripting parse csv file, sha1 hash and output Post 302281229 by rwuerth on Wednesday 28th of January 2009 11:57:36 AM
Old 01-28-2009
Also, I just realized:

the "<<<" for input to sha1sum

Quote:
echo "$name:"$(sha1sum <<< $fein)
Automatically supplies a final newline!

Can you do it with a normal redirect i.e. '<' ?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to Parse a CSV file into a Different Format

Hi I have a CSV file with me in this format Currency, USD, EUR, USD, 1.00, 1.32, EUR, 0.66, 1.00, How do I transpose the file to get to the format below. currency, currency, rate USD, USD, 1.00 USD, EUR, 1.32 EUR, USD, 0.66 EUR, EUR, 1.00 Thanks for your help We are using... (2 Replies)
Discussion started by: cdesiks
2 Replies

2. Shell Programming and Scripting

CSV File parse help in Perl

Folks, I have a bit of an issue trying to obtain some data from a csv file using PERL. I can sort the file and remove any duplicates leaving only 4 or 5 rows containing data. My problem is that the data contained in the original file contains a lot more columns and when I try ro run this script... (13 Replies)
Discussion started by: lodey
13 Replies

3. Shell Programming and Scripting

Parse XML file into CSV with shell?

Hi, It's been a few years since college when I did stuff like this all the time. Can someone help me figure out how to best tackle this problem? I need to parse a file full of entries that look like this: <eq action="A" sectyType="0" symbol="PGR" exch="CA" curr="VEF" sess="NORM"... (7 Replies)
Discussion started by: Pcushing
7 Replies

4. Shell Programming and Scripting

Parse csv file

Hi, Our requirement is to parse the input file(.csv format). The each column in the file is delimited with comma. We need to take each column and apply some business validation rule. If data itself contains comma, then those fields are enclosed with double quotes ("). We can see this double... (7 Replies)
Discussion started by: vfrg
7 Replies

5. Programming

SHA1 hash calculation

hi i want to generate SHA1 hash of string in Linux (atmark) and downloaded the XYSSL-0.9 version code for the same.i have the algorithm which takes file as argument and returns hash of file . And of same file while I generated the key using online tools then it doesn't match with my compiled... (4 Replies)
Discussion started by: ahsaas42
4 Replies

6. Shell Programming and Scripting

how to parse this file and obtain a .csv or .xls

Hello Expert, I have a file in the following format: SYNTAX_VERSION 5 MONITOR "NAME_TEMPLATES" DESCRIPTION "Monitors for contents of error " INTERVAL "1m" MONPROG "script.sh NAME_TEMPLATES" MAXTHRESHOLD GEN_BELOW_RESET SEVERITY Major ... (17 Replies)
Discussion started by: Ant-one
17 Replies

7. Shell Programming and Scripting

Dynamically parse BibTeX and create hash of hash

Hello gurus, Iam trying to parse following BibTex file (bibliography.bib): @book{Lee2000a, abstract = {Abstract goes here}, author = {Lee, Wenke and Stolfo, Salvatore J}, title = {{Data mining approaches for intrusion detection}}, year = {2000} } @article{Forrest1996, abstract =... (0 Replies)
Discussion started by: wakatana
0 Replies

8. Shell Programming and Scripting

How to parse this file using awk and output in CSV format?

My source file looks like this: Cust-Number = "101" Cust-Name="Joe" Cust-Town="London" Cust-hobby="tennis" Cust-purchase="200" Cust-Number = "102" Cust-Name="Mary" Cust-Town="Newyork" Cust-hobby="reading" Cust-purchase="125" Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies

9. Shell Programming and Scripting

Apply md5 hash to a field in csv file

I have a .csv file and I want to md5 hash the second column for each row in the file. File is something like data1,foobar1,123,345 data2,foobar2,456,9393 data3,foobar3,1002,10109 Output would be like data1,6c81243028f8e455fa617dd5f0232ce1,123,345... (3 Replies)
Discussion started by: jjwags
3 Replies

10. Shell Programming and Scripting

Need a script to parse data and output to csv

I am not too savvy with arrays and am assuming that what I am looking for needs arrays. This is my requirement. So I have the raw data that gets updated to a log as shown below StudentInfo: FullInfo = { Address = Newark Age = 20 Name= John } StudentInfo:... (2 Replies)
Discussion started by: sidnow
2 Replies
XtRealizeWidget()														 XtRealizeWidget()

Name
  XtRealizeWidget - realize a widget instance.

Synopsis
  void XtRealizeWidget(w)
	 Widget w;

Inputs
  w	    Specifies the widget to be realized.  Must be of class Core or any subclass thereof.

Description
  XtRealizeWidget()  creates windows for the specified widget and all of its descendants.  If the specified widget is already realized, XtRe-
  alizeWidget() simply returns.  When a widget is first created, no X window is created along with it.	Realizing a widget is  the  term  for
  creating this window, and no widget can appear on the screen until it is realized.  The reason widget creation and window creation are han-
  dled separately is one of efficiency: when an interface is first created, there is an initial process of negotiating geometry and assigning
  a layout to each widget.  If the widgets had windows at this point, the geometry negotiation would require many XConfigureWindow() calls to
  the X server, which would significantly slow down application startup time.

  The "Algorithm" section below describes the procedure followed by XtRealizeWidget().

Usage
  Most applications will call XtRealizeWidget() once just prior to calling XtAppMainLoop() to process events.  The argument to	XtRealizeWid-
  get()  is  usually  the top-level widget returned from XtAppInitialize().  If more widgets are subsequently created, they do not need to be
  realized because when a widget is created as the child of a realized widget, it is automatically realized.  Popup shells are also automati-
  cally realized, if necessary, when they are popped up.

  You can test whether a widget is realized with XtIsRealized().  Until a widget is realized, certain functions will not operate as expected.
  XtWindow(), for example will not return a valid window if called with an unrealized widget.

  You can unrealize a widget (destroy its window) but leave the widget structure intact with XtUnrealizeWidget().

Algorithm
  If the widget is already realized, XtRealizeWidget() simply returns.	Otherwise it performs the following:

  o  Binds all action names in the widget's translation table to procedures.

  o  Makes a postorder traversal of the widget tree rooted at the specified widget and calls each non-NULL  change_managed()  method  of  all
     composite widgets that have one or more managed children.

  o  Constructs  an  XSetWindowAttributes  structure  filled  in with information derived from the Core widget fields and calls the realize()
     method for the widget, which adds any widget-specific attributes and creates the X window.

  o  If the widget is not a subclass of compositeWidgetClass, XtRealizeWidget() returns; otherwise it continues and performs the following:

     -	Descends recursively to each of the widget's managed children and calls the realize() methods.	Primitive  widgets  that  instantiate
	children are responsible for realizing those children themselves.

     -	Maps  all  of  the  managed  children  windows that have mapped_when_managed True.  If a widget is managed but mapped_when_managed is
	False, the widget is allocated visual space but is not displayed.

  If the widget is a top-level shell widget (that is, it has no parent), and mapped_when_managed is True, XtRealizeWidget() maps  the  widget
  window.

  XtCreateWidget(), XtVaCreateWidget(), XtRealizeWidget(), XtManageChildren(), XtUnmanageChildren(), XtUnrealizeWidget(), XtSetMappedWhenMan-
  aged(), and XtDestroyWidget() maintain the following invariants:

  o  If a composite widget is realized, then all its managed children are realized.

  o  If a composite widget is realized, then all its managed children that have mapped_when_managed True are mapped.

  All Intrinsics functions and all widget routines should accept either realized or  unrealized  widgets.   When  calling  the	realize()  or
  change_managed()  methods  for children of a composite widget, XtRealizeWidget() calls the procedures in reverse order of appearance in the
  CompositePart children list.	By default, this ordering of the realize procedures will result in the stacking order of  any  newly  created
  subwindows being top-to-bottom in the order of appearance on the list, and the most recently created child will be at the bottom.

See Also
  XtIsRealized(1), XtUnrealizeWidget(1),
  realize(4).

Xt - Widget Lifecycle														 XtRealizeWidget()
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy