Sponsored Content
Operating Systems Solaris "Processes" truncated on Solaris Post 302384472 by jlliagre on Tuesday 5th of January 2010 12:03:30 PM
Old 01-05-2010
This might work:
Code:
/usr/ucb/ps -alxww | nawk '
$2 != "UID" { printf("%s ",$1); system("getent passwd "$2" | sed s/:.*$// | tr -d \\\\n"); $1=""; $2=""; print $0 }
$2 == "UID" { $2="USER" ; print }
'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Solaris

Solaris escape my script from "-" to "/226"

Hello everyone. I beg your guys pardon please. I try to ls -al in many path/directories. So, I put the code in text file which look like below; ls -al / ls -al /etc ls -al /etc/default ... however, when I paste it to Solaris over SecureCRT, it seems the code was escaped from "-" to... (0 Replies)
Discussion started by: Smith
0 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. Shell Programming and Scripting

need to kill a number of processes with name "XYZ" at a time using shell script

Hi, when i grep for the process "XYZ" , there will be some good number of processes with that name, i want to kill all the these processes at a time using shell script? Any help needed for this action. Thanks Regards, Anil (6 Replies)
Discussion started by: anilmanepu
6 Replies

5. Solaris

Printer configuration Migration from Solaris 10 "LP" to Solaris 11 "CUPS"

Need to find a way to import an LP printers.conf file to CUPS. I have some new Solaris 11.1 boxes that need to have 300 printers added. (0 Replies)
Discussion started by: os2mac
0 Replies

6. Shell Programming and Scripting

What is the use of "finger" command & how to use it to kill the online processes ?

Hi there, I am eager to know what exactly is the use of "finger" command & how to use it to kill the online processes ? :b: (1 Reply)
Discussion started by: abhijitpaul0212
1 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
XtGetValues()															     XtGetValues()

Name
  XtGetValues - query widget resource values.

Synopsis
  void XtGetValues(object, args, num_args)
	 Widget object;
	 ArgList args;
	 Cardinal num_args;

Inputs
  object    Specifies the object whose resource values are to be returned; may be of class Object or any subclass thereof.

  args	    Specifies  the argument list of name/address pairs that contain the resource names and the addresses into which the resource val-
	    ues are to be stored.

  num_args  Specifies the number of arguments in the argument list.

Description
  XtGetValues() retrieves the current values of one or more resources associated with a widget instance.  Each element	in  args  is  an  Arg
  structure  which  contains  the resource name in the name field, and a pointer to the location at which the resource is to be stored in the
  value field.	It is the caller's responsibility to ensure that the value field points to a value of the correct type.  If the  value	field
  points to allocated memory, the caller is also responsible for freeing that memory.

  If  args  contains  a  resource name that is not found in any of the resource lists searched, the value at the corresponding address is not
  modified.

  Many widget resource values are simply copied from the widget to the specified address.  When the resource is a pointer  type  (such	as  a
  string or pointer to a structure) some widgets will make a copy of the pointed to value and store the address of this copy at the specified
  address.  If a copy is made, the caller is responsible for freeing the value when done with it.  If no copy  is  made,  then	the  returned
  value  points  to memory owned by the widget, and the caller must not modify or free this value in any way.  None of the Intrinsics defined
  classes copy values in this way, nor do widgets in the Athena Widget set.  See the documentation for the particular resource of the partic-
  ular widget you are using to determine if a copy is made.

  If  a  resource  value which is a pointer type is returned without being copied, then the returned value may not remain valid indefinitely.
  The Intrinsics specify lifetimes for the following resources: The XtNchildren resource of Composite widgets and any callback list  resource
  are only valid until some operation (such as XtCreateWidget() or XtAddCallback()) modifies the resource.  The XtNtranslations and XtNaccel-
  erators Core resources remain valid at least until the widget is destroyed.  The XtNscreen Core resource remains valid until the Display is
  closed.  See the documentation for the particular resource of the particular widget you are using to determine its lifetime.

  The "Background" section below explains in detail how XtGetValues() finds the requested resource values.

Usage
  Generally  you will use the XtSetArg() macro to initialize the ArgList passed to this function.  You can also use XtVaGetValues() pass it a
  variable-length argument list instead of an ArgList array.  The "Example" section below shows an example use of this function.

  Note that some widgets provide public functions to query the value of commonly used resources.  These functions are generally  faster,  and
  it is usually better specified whether or not the caller must free the returned value.

  You can set a widget's resources with XtSetValues() or XtVaSetValues().

Example
  You can use XtGetValues() as follows to get widget resources:

     Arg args[10];
     int i;
     String label;
     Dimension margin;
     Pixel color;

     /* set up an argument list */
     i = 0;
     XtSetArg(args[i], XtNlabel, &label); i++;
     XtSetArg(args[i], XtNmargin, &margin); i++;
     XtSetArg(args[i], XtNforeground, &color); i++;

     /* query the values */
     XtGetValues(s, args, i);

     /* label, margin, and color now contain the requested values */
     printf("Widget's label is %s; margin is %d.0, label, margin);
     printf("Widget's label is %s; margin is %d.0, label, margin);

     /* In some widget sets we'd have to free label now. */
     /* XtFree(label); */

Background
  XtGetValues() looks for resources named in args using the following procedure:

  o  It  searches  the normal resource lists for the object, starting with the resources of the Object class and proceeding down the subclass
     chain to the class of the object.

  o  If the object's parent is a subclass of constraintWidgetClass, it searches the constraint resource lists of the parent, starting at con-
     straintWidgetClass and proceeding down the subclass chain to the constraint resources of the parent's class.

  Once	all the resources have been fetched from the widget's normal and constraint resources list, XtGetValues() calls the widget's get_val-
  ues_hook() methods.  get_values_hook() procedures can be used to return subpart resource  values  or	constraint  subpart  resource  values
  through  the	XtGetValues() interface (see XtGetSubvalues()) and may modify the data stored at the location addressed by the value field of
  the argument.  This means that a get_values_hook() may be used to make copies of data (such as strings) whose resource representation is  a
  pointer.  The get_values_hook() methods are called as follows:

  o  If  any  get_values_hook()  methods  in the object's class or superclass records are non-NULL, they are called in superclass-to-subclass
     order.

  o  If the object's parent is a subclass of constraintWidgetClass, and if any of the parent's class or superclass records have declared Con-
     straintClassExtension  records in the Constraint class part extension field with a record type of NULLQUARK and if the get_values_hook()
     field in the extension record is non-NULL, then XtGetValues() calls these get_values_hook() procedures in superclass-to-subclass order.

Structures
  An Arg is defined as follows:

     typedef struct {
	 String name;
	 XtArgVal value;
     } Arg, *ArgList;

See Also
  XtSetArg(1), XtSetValues(1), XtVaGetValues(1), XtVaSetValues(1),
  get_values_hook(4).

Xt - Resource Management													     XtGetValues()
All times are GMT -4. The time now is 11:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy