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
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
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
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)
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
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
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
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
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)
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
LEARN ABOUT LINUX
zsoelim
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).
Colin Watson (cjwatson@debian.org).
2.6.0.2 2011-04-13 ZSOELIM(1)