Sponsored Content
Top Forums UNIX for Dummies Questions & Answers shell script for long listing of groupnames Post 302492522 by mike12 on Monday 31st of January 2011 07:38:57 PM
Old 01-31-2011
shell script for long listing of groupnames

Hello,

When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated.

Can someone help with the script which would display the truncated group name?

I appreciate if someone could help in this regard.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

long listing of files up to a given date

Hi I would like to a long list of files up to a given date. I've tried: ls -al > filelist but this command gives me all the files. I've also have tried the find command: find . -mtime -10 -type f -print > filelist This gives me information on active file within the past 10 days and... (2 Replies)
Discussion started by: rlh
2 Replies

2. UNIX for Dummies Questions & Answers

Is there a way to tell how long does a shell script's execution take?

Is there a way to tell how long does a shell script(or a shell command)'s execution take? (4 Replies)
Discussion started by: meili100
4 Replies

3. Shell Programming and Scripting

long process listing with /usr/ucb/ps weird behaves

hello I am trying to run the following script to get the my-progam pid: #!/bin/ksh tt=`/usr/ucb/ps| grep -i $1| grep -v grep | awk '{print $2}'` echo $tt When I run the script I get the more PIDs $./test.sh my-program 12033 15033 15034 Actually my-program's PID is 12033....I... (6 Replies)
Discussion started by: sreeniatbp
6 Replies

4. Shell Programming and Scripting

grep/matching help with long listing of directories

How do I get this to work? cat somefile | grep "-rw-r--r-- 1 root wheel 287 Sep 10 15:12 shells~" This is the the desired output -rw-r--r-- 1 root wheel 287 Sep 10 15:12 shells~ I basically want an exact match of the line I am grepping for, the special characters and... (5 Replies)
Discussion started by: streetfighter2
5 Replies

5. UNIX for Dummies Questions & Answers

Long listing of files using find command on remote server via SSH

Hi , I am trying to find some files on a remote machine using the find command. >ssh -q atukuri@remotehostname find /home/atukuri/ -name abc.txt /home/atukuri/abc.txt The above command works fine and lists the file, but if I want to do a long listing of files (ls -l) its not working . ... (2 Replies)
Discussion started by: atukuri
2 Replies

6. UNIX for Advanced & Expert Users

script regarding listing long group names

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies

7. Solaris

Listing the long groupnames

Hello, When listing the file systems (using ls -ltr) , if the group names are longer the group name is getting truncated. Can someone help with the script which would display the truncated group name? I appreciate if someone could help in this regard. (1 Reply)
Discussion started by: mike12
1 Replies

8. Shell Programming and Scripting

Need help in listing directories inside korn shell script

Hi All, I need to loop through each item in current path, if it is a direcotry do soemthing, if its a file jsut skip it and move to next item in loop. Tried if test ! -d $i then echo "The current item $i is not a directory" continue fi This doesnt seems to be working .... (8 Replies)
Discussion started by: justchill
8 Replies

9. Shell Programming and Scripting

Shell script to run sql query having a long listing of parameters

Hi, I have a query regarding execution of a sql query having long listing of parameters ..I need to execute this query inside a shell script. The scenario is like.... Suppose I have a file abc.txt that has the card numbers..it could be in thousands.. then I need to fire a query like ... (12 Replies)
Discussion started by: vsachan
12 Replies

10. UNIX for Beginners Questions & Answers

Listing a file/directory with 7 letters long

I know that I can use wild cards:ls ???????to list files 7 characters long, but how do i omit the .?! and spaces? Please use CODE tags when displaying sample input, sample output, and code segments. (2 Replies)
Discussion started by: hiya54
2 Replies
id(1)							      General Commands Manual							     id(1)

NAME
id - print user and group IDs and names SYNOPSIS
[user] [user] [user] DESCRIPTION
The command writes a message to standard output, giving the user and group IDs and names for the process. If the effective and real IDs are different, both are printed. If the process has supplementary group affiliations (see groups(1)), the supplementary group affiliations are also written. If the user operand is specified and the process has appropriate privileges, the user and group IDs of the selected user are written. In this case, effective IDs are assumed to be identical to real IDs. If the selected user has more than one allowable group membership listed in the group database, then the group membership information is written. Options The following options modify the behavior described above. Display only the group ID. The default is the effective group ID; to modify, use the option. If the process has supplementary group affiliations that are different from the effective group ID (or the real ID if the option is used), display each such affiliation on the same line. The default is decimal format; to modify, use the option. Output all different group IDs (effective, real, and supplementary) only, using the format "%u ". If there is more than one distinct group affiliation, output each such affiliation, using the format " %u", before the <newline> is output. With A or display the ID name instead of the ID number. With or display the real ID instead of the effective ID. Display only the user ID. The default is the effective user ID; to modify, use the option. The default is decimal format; to modify, use the option. Displays process resource group ID for the process along with the user and group IDs and names. The option ignores user argument. See HP Process Resource Manager in RETURN VALUE
The error codes returned by are : Success. User not found or invalid options or invalid combination of options. The option is given when PRM is not supported or configured. EXAMPLES
To display the current user and group data: produces: To display the group ID number for the current process: produces: To display the group name for the current process: produces: To display the user and group data for another user: produces: To display the PRM group ID for the current process: produces: DEPENDENCIES
HP Process Resource Manager The option requires that the optional HP Process Resource Manager (PRM) software be installed and configured. See prmconfig(1) for a description of how to configure HP PRM, and prmconf(4) for the definition of the process resource group. AUTHOR
was developed by HP and AT&T. SEE ALSO
groups(1), logname(1), getuid(2). HP Process Resource Manager: prmconfig(1), prmconf(4) in STANDARDS CONFORMANCE
id(1)
All times are GMT -4. The time now is 11:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy