Sponsored Content
Top Forums Shell Programming and Scripting awk can't open file; file merge attempt Post 303023079 by shamrock on Tuesday 11th of September 2018 11:32:55 AM
Old 09-11-2018
Does FileA have an asterisk as its trailing character... "FileA*" or is it simply "FileA"?
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

merge two files into one file use awk

Hi, guys. I have one question: I have two files: passwd and shadow (the number of records in these files are not equal)the contents of them are below: passwd: ************** ftp:x:24:24: sshd:x:71:65: uucp:x:10:14: brownj:x:5005:1000: sherrys: x :5006:1000: ... ************* ... (2 Replies)
Discussion started by: daikeyang
2 Replies

2. Shell Programming and Scripting

Merge lines in a file with Awk - incorrect output

Hi, I would like: FastEthernet0/0 is up, line protocol is up 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 output errors, 0 collisions, 0 interface resets Serial1/0:0 is up, line protocol is up 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 0... (14 Replies)
Discussion started by: mv652
14 Replies

3. Shell Programming and Scripting

please help to merge file with awk or sed

hi experts please help me,thanks in advance file1 arch : x86 install : pass make os : pass make build kernel : pass=100 failed=45 usb storage pass : The Linux Kernel Archives file2 arch : ppc install : failed make os : http://kernel.org (6 Replies)
Discussion started by: yanglei_fage
6 Replies

4. Shell Programming and Scripting

two file merge with awk

Help I read a file that has 2 fields. look for in a second file the first field and update it with the second field of first file. file1 1131518fat11416.txt ../newaod/2001/04/2001-04-00129233-1.txt file2 INSERT INTO tabric VALUES... (2 Replies)
Discussion started by: mcarlo65
2 Replies

5. UNIX for Dummies Questions & Answers

file merge using awk

Hi All, I have 2 csv files. 1st file has 10 columns and the 2nd file has 12 columns. The requirement is, if the 4th column of file1 matches with the 4th column of file2, then append the 12th column of file2 with file1. Both files have equal number of lines and the 4th column values are... (1 Reply)
Discussion started by: ganesh_248
1 Replies

6. UNIX for Dummies Questions & Answers

merge files along with file names (awk)?

Dear programmers, I have a question about conditionally merging multiple files and having their file names in the first column. Input files: file.1.extension file.2.extension file.3.extension file.4.extension ... file.1000.extension where each file looks like this (with multiple lines):... (5 Replies)
Discussion started by: wei.deng
5 Replies

7. Shell Programming and Scripting

Awk: cannot open file (No such file or directory)

Hello folks! I am new to Shell and awk scripting. This is my shell script that receives a string as an input from the user from the stdin. #!bin/sh printf "Enter your query\n" read query cmd=`echo $query | cut -f 1 -d " "` input_file=`echo $query | cut -f 2 -d " "` printf $input_file... (10 Replies)
Discussion started by: radiohead_
10 Replies

8. Shell Programming and Scripting

How to merge fields in a single file using awk ?

Hi, From a file, using: awk -F" " '{ if (NF == 6) print $1, $2, $3, $4, $5, $6; if (NF == 5) print $1, $2, $3, $4, $5; }' i printed out the required output. But i'm trying to merge the columns. Please look at the desired output. Any suggestions? Thanks Output: 00015 PSA1 ... (5 Replies)
Discussion started by: web2moha
5 Replies
XtNameToWidget()														  XtNameToWidget()

Name
  XtNameToWidget - find a named widget.

Synopsis
  Widget XtNameToWidget(reference, names);
	 Widget reference;
	 String names;

Inputs
  reference Specifies the widget from which the search is to start.  Must be of class Core or any subclass.

  names     Specifies the partially qualified name of the desired widget.

Returns
  A child of reference that matches names.

Description
  XtNameToWidget()  returns a descendant of the reference widget whose name matches the specified names.  The names argument specifies a sim-
  ple object name or a series of simple object name components separated by periods or asterisks.  Asterisks have the same  meaning  to  this
  function as they do in a resource file.

  The "Algorithm" section below explains the procedure XtNameToWidget() uses to find the named child.

Usage
  If  you  want  to look up an immediate child of a widget, simply pass the widget and the child's unqualified name.  If you need to lookup a
  descendant, you can provide a fully qualified name to that descendant, or if you don't know the full name, or if you don't  even  know  how
  many levels removed that descendant is, you can use an asterisk before the name.

  Note that if there is more than one child with the specified name, it is undefined which will be returned.

  You  can  use XtNameToWidget() to hide the details of a user interface and for modular programming.  If module A creates an interface which
  contains a text widget, and module B need to get the contents of the text widget, module A could export the text widget in a	global	vari-
  able,  or instead, it could simply define the name of the text widget as part of the module definition.  Then module B, or any other module
  could look up that widget with XtNameToWidget() when it is needed.  Because XtNameToWidget() supports  wildcarding,  module  A  can  freely
  change the details of the widget hierarchy it creates as long as the name of the text widget remains unique.

Algorithm
  XtNameToWidget() returns the descendant with the shortest name that matches the specification according to the following rules (where child
  is either a popup child or a normal child if the widget is a subclass of Composite):

  o  Enumerate the object subtree rooted at reference widget in breadth-first order, qualifying the name of each object with the names of all
     its ancestors up to but not including reference.  The ordering between children of a common parent is not defined.

  o  Return  the  first  object in the enumeration that matches the specified names, where each component of names matches exactly the corre-
     sponding component of the qualified object name and an asterisk matches any series of components, including none.

  o  If no match is found, return NULL.

  Since breadth-first traversal is specified, the descendant with the shortest matching name (i.e., the fewest number of components), if any,
  will always be returned.  However, since the order of enumeration of children is undefined and since the Intrinsics do not require that all
  children of a widget have unique names, XtNameToWidget() may return any child that matches if there are multiple  objects  in  the  subtree
  with	the same name(s).  Consecutive separators (periods or asterisks) that contain at least one asterisk are treated as a single asterisk.
  Consecutive periods are treated as a single period.

See Also
  XtCreateWidget(1), XtName(1).

Xt - Object Information 													  XtNameToWidget()
All times are GMT -4. The time now is 02:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy