11-12-2007
Quote:
Originally Posted by
llsmr777
Is there a way to make the outputs be side by side columns?
Side by side is harder as you'd have to either make temporary files or store the lists in memory, then display it back out once you are ready.
Shell doesn't lend itself very well to formatting output, you'd have to monkey about with inserting a number of tab characters based on how long the various names in the file are.
Perl would probably be the language of choice for this as it's got a very nice function for generating reports etc called 'format'. You can design a form, then populate the data and dump it out via the 'write' command. It'd be a bit more complex than the previous shell script though as it would also need to store things in memory or in files rather than streaming everything.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm running against a file with 1008 records like this, all beginning '4760 Slave':
4760 Slave,7,3607 ,GL ,200605,11320024 , ,GBP ,X00033
,AI80190 ... (1 Reply)
Discussion started by: miwinter
1 Replies
2. Shell Programming and Scripting
this one is a bit tricky:
host16 /etc/passwd changed Thu Jan 3 16:39:48
host3 /etc/group changed Thu Jan 3 16:39:48
host2 /etc/services changed Thu Jan 3 16:39:48
host10 /etc/group changed Thu Jan 10 09:59:01
host11 /etc/group changed Thu Jan 3 18:55:38
host17 /etc/group changed Thu Jan... (9 Replies)
Discussion started by: funksen
9 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have a file that is a fdupes output. I'd like to sort the duplicated file by size. The format file is the following:
5996544 bytes each:
/path1/to/file1.jpg
/path2/to/file1.jpg
/pathx/to/file1.jpg
... random number of lines
/path999/to/file1.jpg
591910 bytes each:... (2 Replies)
Discussion started by: AdminLew
2 Replies
4. Shell Programming and Scripting
Hi All,
I would like to ask help on how can i achieve below output.
Inputfile:
Oct11,apa1-daily,01:25:01
Oct11,apa2-daily,01:45:23
Oct12,apa1-daily,02:30:11
Oct12,apa2-daily,01:55:01
Oct13,apa1-off,01:43:34
Oct13,apa2-off,01:22:04
Desired output:
Clients ... (3 Replies)
Discussion started by: mars101
3 Replies
5. Shell Programming and Scripting
Hi,
I am sorting a file, but getting different output with crontab.
input file-file
z
Z
x
X
y
Y
when I sort manually
sort file
x
X
y
Y
z
Z (4 Replies)
Discussion started by: suresh3566
4 Replies
6. Shell Programming and Scripting
Hi all! I have a comma delimited file and I'm sorting it based on fields 6, 8 and 10. The following does the job:
sort -t, -nk6,10 unsorted.txt -o sorted.txt
What I need to do now is to write every row containing same values on fields 6, 8 and 10 to a different file.
Any ideas on how to do... (2 Replies)
Discussion started by: Tr0cken
2 Replies
7. Shell Programming and Scripting
Now I van sort in hour-minute-second. I need in seconds
ps -eo pid,etime,args --sort=start_time | grep bash
Sample Output
15064 03:23 -bash
I need in 03:23 in seconds (1 Reply)
Discussion started by: anil510
1 Replies
8. Shell Programming and Scripting
with a command i get a long list (example) and the entrys are intended.
DName=AAAAA
DName=AAAAA
lba=838,860,800
label=ftw_1
DName=BBBBB
DName=BBBBB
lba=838,860,800
label=ftw_2
DName=CCCCC
... (3 Replies)
Discussion started by: Serano
3 Replies
9. Linux
Hi,
I am using a command :-
ps -auxwww 2> /dev/null | awk 'match ($0, GIN:*/) {print substr($0, RSTART+3, RLENGTH-3)}' | sort | grep -v -F 'which gives output as
3 aruau
5 asun
4 cgan
Now I need a command which gives me something like this :-
3 aruau
5 asun
4 cgan... (2 Replies)
Discussion started by: Raj999
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
This is one of the thing that am looking for when I post the question on the ps wrapper. It has since been closed as it has taken me too long to post an example.
I have replaced some of the original content of the ps output.
uname -a = SunOS <hostname> 5.11 11.3 sun4v sparc sun4v
... (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT SUSE
xcompmgr
xcompmgr(1) General Commands Manual xcompmgr(1)
NAME
xcompmgr - sample X compositing manager
SYNOPSIS
xcompmgr [-d display] [-r radius] [-o opacity] [-l left-offset] [-t top-offset] [-acCfFnsS]
DESCRIPTION
xcompmgr is a sample compositing manager for X servers supporting the XFIXES, DAMAGE, and COMPOSITE extensions. It enables basic eye-candy
effects.
OPTIONS
-d display
Specifies the display to manage.
-r radius
Specifies the blur radius for client-side shadows.
-o opacity
Specifies the opacity for client-side shadows.
-l left-offset
Specifies the left offset for client-side shadows.
-t top-offset
Specifies the top offset for client-side shadows.
-I fade-in-step
Specifies the opacity change between steps while fading in.
-O fade-out-step
Specifies the opacity change between steps while fading out.
-D fade-delta
Specifies the time (in milliseconds) between steps in a fade.
-a Automatic server-side compositing. This instructs the server to use the standard composition rules. Useful for debugging.
-c Client-side compositing with soft shadows and translucency support.
-f When -c is specified, enables a smooth fade effect for transient windows like menus, and for all windows on hide and restore events.
-n Simple client-side compositing.
-s Server-side compositing with hard-edged shadows.
-C When -c is specified, attempts to avoid painting shadows on panels and docks.
-F When -f is specified, also enables the fade effect when windows change their opacity, as with transset(1).
-S Enables synchronous operation. Useful for debugging.
BUGS
Probably. Please report any you find to http://bugs.freedesktop.org/.
AUTHORS
Keith Packard, with contributions from Matthew Allum, Eric Anholt, Dan Doel, Thomas Luebking, Matthew Hawn, Ely Levy, Phil Blundell, and
Carl Worth.
xcompmgr(1)