Sponsored Content
Top Forums UNIX for Advanced & Expert Users unix command for terminal - view sequences as a single line? Post 302532982 by bartus11 on Wednesday 22nd of June 2011 02:14:59 PM
Old 06-22-2011
Try:
Code:
ls | perl -F"\." -nae 'if ($F[2]){push @{$a{$F[0]}},$F[1];$e{$F[0]}=$F[2]}else{$a{$_}=1};END{for $i (keys %a){@n=sort {$a <=> $b}@{$a{$i}};if (@n){print "$i.$n[0]-$n[$#n].$e{$i}"}else{print $i}}}'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

run command Unix on a single line

Hi everybody.. I need to enter in bash mode and then run a command and this just in a single command line. I tried : "bash ^M| somecommand" but nothing.. How do I do to simulate the return button just right after the bash command ? Thanks.. (8 Replies)
Discussion started by: Riddick61
8 Replies

2. Shell Programming and Scripting

Is command line invocation of gnome-terminal to run more than one command possible?

Hello, I am trying to learn how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here: #! /bin/bash # #TODO write this for gnome and xterm USAGE=" ______________________________________________ ${0##*/} run... (0 Replies)
Discussion started by: Narnie
0 Replies

3. UNIX Desktop Questions & Answers

How do you reverse terminal command line to the top?

Hi All, I work on a Linux platform which runs Red Hat (forget which version) and use both korn and bash shells. Is there a way of making the command line appear at the top of the terminal window and any lists, commands or directory names etc to appear below the top, that is to say reverse the... (1 Reply)
Discussion started by: ray_m
1 Replies

4. OS X (Apple)

How to start a new terminal from command line?

Dear All, Anyone knows how to start a new bash terminal from command line? Another question: when I use "open" command (open test.pdf) to open a pdf file, the PDF reader will start up, but cannot associate with that file. Anyone knows why? (1 Reply)
Discussion started by: andrewust
1 Replies

5. UNIX for Advanced & Expert Users

View tiled photo thumbnails in command line

Is there a good way of showing around 4 pictures (fairly large thumbnails) at once on the command line, preferably tiled so that all of them are viewable. I tried using display but I'm not sure how to tile them. I'd also prefer if it was read only so that they cannot be altered in the viewer. ... (1 Reply)
Discussion started by: cue
1 Replies

6. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

7. Shell Programming and Scripting

Can I view doc files from terminal

Sometimes I'm working from terminal for long periods of time and I come across a doc file I don't recognize. I've been trying to figure out how to view it instead of opening up word. I've tried cat but it jumps into binary and my terminal goes nuts. Is there a way I can do this from... (4 Replies)
Discussion started by: syregnar86
4 Replies

8. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

9. OS X (Apple)

A new OSX 10.12.x terminal from the command line.

Hi guys and gals... After much searching on the good ol' internet I could find nothing, so this is the result. ALthough many people seem to have asked this question no-one seems to have a solution so here we go. I need for AudioScope.sh, 'xterm' to run a second program for some of its... (2 Replies)
Discussion started by: wisecracker
2 Replies
ZZIP_OPEN(3)						       zziplib Function List						      ZZIP_OPEN(3)

NAME
zzip_open, zzip_open_ext_io, zzip_open_shared_io - ... SYNOPSIS
#include <zzip/lib.h> ZZIP_FILE * zzip_open((zzip_char_t * filename, int o_flags)); ZZIP_FILE * zzip_open_ext_io((zzip_char_t * filename, int o_flags, int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io)); ZZIP_FILE * zzip_open_shared_io((ZZIP_FILE * stream, zzip_char_t * filename, int o_flags, int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io)); DESCRIPTION
The zzip_open_ext_io function uses explicit ext and io instead of the internal defaults, setting them to zero is equivalent to zzip_open note that the two flag types have been split into an o_flags (for fcntl-like openflags) and o_modes where the latter shall carry the zzip_flags and possibly accessmodes for unix filesystems. Since this version of zziplib can not write zipfiles, it is not yet used for anything else than zzip-specific modeflags. The zzip_open_ext_io function returns a new zzip-handle (use zzip_close to return it). On error the zzip_open_ext_io function will return null setting errno(3). The zzip_open_shared_io function takes an extra stream argument - if a handle has been then ext/io can be left null and the new stream handle will pick up the ext/io. This should be used only in specific environment however since zzip_file_real does not store any ext-sequence. The benefit for the zzip_open_shared_io function comes in when the old file handle was openened from a file within a zip archive. When the new file is in the same zip archive then the internal zzip_dir structures will be shared. It is even quicker, as no check needs to be done anymore trying to guess the zip archive place in the filesystem, here we just check whether the zip archive's filepath is a prefix part of the filename to be opened. Note that the zzip_open_shared_io function is also used by zzip_freopen that will unshare the old handle, thereby possibly closing the handle. The zzip_open_shared_io function returns a new zzip-handle (use zzip_close to return it). On error the zzip_open_shared_io function will return null setting errno(3). AUTHOR
o Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi> COPYRIGHT
Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim All rights reserved, use under the restrictions of the Lesser GNU General Public License or alternatively the restrictions of the Mozilla Public License 1.1 zziplib 0.13.56 ZZIP_OPEN(3)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy