Sponsored Content
Top Forums UNIX for Advanced & Expert Users unix command for terminal - view sequences as a single line? Post 302534797 by kentm on Tuesday 28th of June 2011 08:05:47 PM
Old 06-28-2011
I haven't tried that, but there is unfortunately a bigger problem with it in that if there are breaks in a sequence this cmd won't show them. For example if there is a range of files like this:


filename.1.ext
filename.2.ext
filename.3.ext
filename.4.ext

filename.6.ext
filename.7.ext
filename.8.ext

then the result is still

filename.1-8.ext

which is not useful. It would need to read out as such:

filename.1-4.ext
filename.6-8.ext

-

Regarding getting it to a form where I can link a shortened cmd to is, someone else suggested this:

"The simplest thing to do is toss that one-liner into an executable file, and modify your alias to pipe the output of ls into that. The next simplest thing to do is switch to bash (assuming you're not using it already), and put it into a function. Otherwise, put a ' (single quote) at the start, and every time you get to a single quote, end the previous quote, wrap the single quote in double quotes, and then start with another single quote:

'ls | perl -F"\\." -nae '"'"'if...

You might consider replacing the internal double quotes with qq(), too."
 

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
ZSOELIM(1)							Manual pager utils							ZSOELIM(1)

NAME
zsoelim - satisfy .so requests in roff input SYNOPSIS
zsoelim [-CVh] [file ...] DESCRIPTION
zsoelim parses file arguments, or if none are specified, its standard input for lines of the form: .so <filename> These requests are replaced by the contents of the filename specified. If the request cannot be met, zsoelim looks for filename.ext where .ext can be one of .gz, .Z or .z. Other extension types may be supported depending upon compile time options. If the request can be met by a compressed file, this file is decompressed using an appropriate decompressor and its output is used to satisfy the request. Traditionally, soelim programs were used to allow roff preprocessors to be able to preprocess the files referred to by the requests. This particular version was written to circumvent problems created by support for compressed manual pages. OPTIONS
-C, --compatible This flag is available for compatibility with other soelim programs. Its use is to enable .so requests followed by something other than whitespace. As this is already the default behaviour, it is ignored. -h, --help Print a help message and exit. -V, --version Display version information. SEE ALSO
nroff(1), troff(1), groff(1), man(1). AUTHOR
Wilf. (G.Wilford@ee.surrey.ac.uk). Fabrizio Polacco (fpolacco@debian.org). 2.5.2 2008-05-05 ZSOELIM(1)
All times are GMT -4. The time now is 02:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy