Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

4DOS for Linux?

202 views
Skip to first unread message

David Morgenlender

unread,
May 21, 1997, 3:00:00 AM5/21/97
to

Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
with 4DOS, it's a great command processor replacement for DOS; it supports
aliases, command recall (including the ability to specify the beginning of the
commands to recall), command completion, etc. I'm currently using the bash
shell. This provides many of the 4DOS features, but not all (at least I've been
unable to find them as of yet). This is my first exposure to linux.

Dave Morgenlender
e-mail: dmo...@mediaone.net

Kevin E Cosgrove

unread,
May 21, 1997, 3:00:00 AM5/21/97
to


Try tcsh. It's like c-shell, but with lots of extras.

G'luck...

--
Kevin.E....@Tek.COM.NOSPAM
Unless otherwise noted, the statements herein reflect my personal
opinions and not those of any organization with which I may be affiliated.
X-PGP-Fingerprint: 3E 70 6A 31 3A E8 24 08 9A A2 29 7E 6E 61 D5 F4

Tim

unread,
May 21, 1997, 3:00:00 AM5/21/97
to

In comp.os.linux.setup David Morgenlender <dmo...@mediaone.net> wrote:

>Is there any way to get 4DOS-type capabilities in Linux? For those
>unfamiliar with 4DOS, it's a great command processor replacement for DOS;
>it supports aliases, command recall (including the ability to specify the
>beginning of the commands to recall), command completion, etc. I'm
>currently using the bash shell. This provides many of the 4DOS features,
>but not all (at least I've been unable to find them as of yet). This is
>my first exposure to linux.

Of the three (or three and a half) example features you mentioned, bash
supports them all. Can you be specific about the features you want? Then
maybe we can point you in the right direction (in or out of bash).

--
Tim Sweeney Harborhi Consultants Boothbay Harbor, Maine

Not valid in all 50 states. Void where prohibited.
The contents of this post are for entertainment purposes only.

Victor B. Wagner

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

>Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
>with 4DOS, it's a great command processor replacement for DOS; it supports
>aliases, command recall (including the ability to specify the beginning of the
>commands to recall), command completion, etc. I'm currently using the bash
>shell. This provides many of the 4DOS features, but not all (at least I've been
>unable to find them as of yet). This is my first exposure to linux.

The only two things which are missed from 4DOS are
online hypertext help system and select command.

describe command is also missed, but in Unix you can put
all the description in file name itself.

When you learn how to use <TAB> key (it behaves slightly
differently than in 4DOS, but may be even better)
you would be able to deal with long file names.

All other features can be found either as part of build-in
bash syntax or as separate utilities in your system.

Don't cry for 4DOS it is great for weird Microsoft OSes
but bash is much better for normal POSIX systems.

Read man bash and man builtin and you will found most
of features you need.

I would also reccomend to include

alias list=less
in your .bash_profile for first time.

if you used to colored dir listings read Color-ls-HOWTO.

if you want to have online help, find good info browser.
(I wasn't able to find one, but I have very limited access
to WWW. XWPE is better than native info for those who hate
EMACS, but it is editor and integrated environment, so takes
some more time to load than we expect from online help)

But select ...
I'm sure that I can write good replacement within two hours,
and may be I would find this two hours.

>Dave Morgenlender
>e-mail: dmo...@mediaone.net


---------------------------------------------------------------------------
Phone: 7(095)230-80-61 Victor B. Wagner
Fax: 7(095)230-80-42 Dokuchaev Soil Institute, Pyzhevsky lane, 7
EMail: vi...@agropc.msk.su Moscow,109017 Russia


Richard Steiner

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

Here in comp.os.linux.misc,comp.os.linux.setup, David Morgenlender
<dmo...@mediaone.net> spake unto us, saying:

>Is there any way to get 4DOS-type capabilities in Linux?

That'd be nice. :-) I practically live in 4OS2 in Warp and 4DOS in
DOS, and there are some things they do (like picklists for matching and
command history, and also the SELECT command) that I miss.

FWIW, if you use the command-line in mc (Midnight Commander), using the
Alt-Tab key will bring up a 4DOS-style picklist on a partial match if
the show_all_if_ambiguous value is 1 in ~/.mc.ini.

--
-Rich Steiner >>>---> rste...@skypoint.com >>>---> Bloomington, MN
Written online using slrn 0.9.3.2 and fte 0.45 for Linux!
The Theorem Theorem: If If, Then Then.

David Morgenlender

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

Victor,

That's a lot of info ... thanks! I'll try some of those things & look up some
of that documentation!

BTW, I've solved my editor problem by purchasing Visual SlickEdit. I've
configured it for Brief emulation. So at least there's something familiar in
which I can feel immediately comfortable!

Dave Morgenlender
e-mail: dmo...@mediaone.net

David Morgenlender

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

Victor,

I can't find any ".bash_profile" on my system. Does this mean I have to start
from scratch, or could the file be under a different name, even an example file?
Where should I place this file?

David Morgenlender

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

I suspect there's a lot of capability I have yet to uncover.

Here's one thing I use a lot in 4DOS that doesn't seem to be in bash ... I'll
type the beginning of a command, then repetitive up-arrow to see previous
commands with the same beginning. For example I might enter "d"; then
up-arrows cycles through only those previous commands beginning with "d". Is
there any way to do this in bash?

This isn't part of 4DOS, but is there any screen recall capability, i.e. the
ability to recall output which has scrolled off the window?

Tim <tswe...@harborhi.com> wrote:

>In comp.os.linux.setup David Morgenlender <dmo...@mediaone.net> wrote:
>
>>Is there any way to get 4DOS-type capabilities in Linux? For those
>>unfamiliar with 4DOS, it's a great command processor replacement for DOS;
>>it supports aliases, command recall (including the ability to specify the
>>beginning of the commands to recall), command completion, etc. I'm
>>currently using the bash shell. This provides many of the 4DOS features,
>>but not all (at least I've been unable to find them as of yet). This is
>>my first exposure to linux.
>

>Of the three (or three and a half) example features you mentioned, bash
>supports them all. Can you be specific about the features you want? Then
>maybe we can point you in the right direction (in or out of bash).
>
>--
>Tim Sweeney Harborhi Consultants Boothbay Harbor, Maine
>
>Not valid in all 50 states. Void where prohibited.
>The contents of this post are for entertainment purposes only.

Dave Morgenlender
e-mail: dmo...@mediaone.net

Hans-Joachim Baader

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

In article <3388161c...@snews.zippo.com>,

David Morgenlender <dmo...@mediaone.net> wrote:
>Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
>with 4DOS, it's a great command processor replacement for DOS; it supports
>aliases, command recall (including the ability to specify the beginning of the
>commands to recall), command completion, etc. I'm currently using the bash
>shell. This provides many of the 4DOS features, but not all (at least I've been
>unable to find them as of yet). This is my first exposure to linux.

bash has all features of 4DOS 4.0, and much more. I don't know about
later versions of 4DOS. Ask me what you're missing.

oh, and one restriction: bash doesn't support command logging, AFAIK.
But this can be done with other programs, eg. script.

Hans-Joachim

--
Uncle Ed's Rule of Thumb: Never use your thumb for a rule.
You'll either hit it with a hammer or get a splinter in it.

Christopher Morrone

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

David Morgenlender (dmo...@mediaone.net) wrote:
: Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
: with 4DOS, it's a great command processor replacement for DOS; it supports
: aliases, command recall (including the ability to specify the beginning of the
: commands to recall), command completion, etc. I'm currently using the bash
: shell. This provides many of the 4DOS features, but not all (at least I've been
: unable to find them as of yet). This is my first exposure to linux.

Actually, 4DOS just supplies many UNIX-like capabilities. :) What are the
features that you haven't been able to find yet?

Robert Heller

unread,
May 22, 1997, 3:00:00 AM5/22/97
to

dmo...@mediaone.net (David Morgenlender),
In a message on Wed, 21 May 1997 15:37:04 GMT, wrote :

DM> Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
DM> with 4DOS, it's a great command processor replacement for DOS; it supports
DM> aliases, command recall (including the ability to specify the beginning of the
DM> commands to recall), command completion, etc. I'm currently using the bash
DM> shell. This provides many of the 4DOS features, but not all (at least I've been
DM> unable to find them as of yet). This is my first exposure to linux.
DM>
DM> Dave Morgenlender
DM> e-mail: dmo...@mediaone.net
DM>
Try tcsh (/bin/tcsh). I have not used 4DOS, but it sounds like tcsh will to
what you want. (bash might too). Note: you need to set things up in your
.cshrc/.tcshrc or your .bashrc/.profile/.bash_login. Read the man pages
*carefully*. Maybe even print them out. There is a lot of setup stuff for bash
and tcsh for the command line editing and recall.



--
\/
Robert Heller ||InterNet: Hel...@CS.UMass.EDU
http://vis-www.cs.umass.edu/~heller ||FidoNet: 1:321/153
http://netmar.com/mall/shops/heller /\

Veksler Michael

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

Christopher Morrone (cmor...@gilb87.gilb.udel.edu) wrote:
> David Morgenlender (dmo...@mediaone.net) wrote:
> : Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
> : with 4DOS, it's a great command processor replacement for DOS; it supports
> : aliases, command recall (including the ability to specify the beginning of the
aliases:
bash, zsh : alias alias_name='whatever'
tcsh: alias alias_name 'whatever' (\!1 for arg 1, \!2,...)
command recall:
bash : the nearest is ^R, or arrow-up
zsh,tcsh : ESC-p (or Alt-p)

> : commands to recall), command completion, etc. I'm currently using the bash

All have command completion. zsh and tcsh have programmable completions.

> : shell. This provides many of the 4DOS features, but not all (at least I've been
> : unable to find them as of yet). This is my first exposure to linux.

> Actually, 4DOS just supplies many UNIX-like capabilities. :) What are the
> features that you haven't been able to find yet?

Even "help" is present:
zsh: Esc-h will invoke man for the command, and then will return to
the original command line (which is unharmed).
tcsh: Esc-h Will look for plain text help files. Most systems do not
have these text files ready (including Linux).

Select (kind of):
zsh, tcsh: enter your glob pattern (like *.c), key in ^X-*
you will get the list of all the files that match your
pattern. Then you can delete the irrelevant files from your
command line.
What is missing here is the ability to some more information about the
files, like date, size, file type. Maybe there is a need to write
a proper select using ncurses (few hours of work):
command arg1 arg2 `select *.c` argN

The only features I had in 4dos and miss in UNIX (did not boot dos/windoz
for 6 months):
- proper select (it is nicer than cut-n-paste after "ls -l")
- DOS' copy *.c *.sqc
(nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").
I once wrote a perl script to do the job, but it always confused me.
This script was forgotten at Intel, when I left them.

I wish I could recommend zsh, but since I am using tcsh, it will be a bad
idea. I did not move to zsh yet, due to my legacy environment setups.
What is certain is that bash-1.xx is inferior to zsh and tcsh as an
interactive shell (no programmable completions, weaker command recall,
and more). I don't know anything about bash-2.0 it may have all the
features that zsh has (the executable is much bigger that tcsh or zsh).

Michael


GianPiero Puccioni

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

David Morgenlender (dmo...@mediaone.net) wrote:
> I suspect there's a lot of capability I have yet to uncover.
>
> Here's one thing I use a lot in 4DOS that doesn't seem to be in bash ...
>I'll type the beginning of a command, then repetitive up-arrow to see
>previous commands with the same beginning. For example I might enter
>"d"; then up-arrows cycles through only those previous commands
>beginning with "d". Is there any way to do this in bash? Something
>similar can be done in bash with the "history-search" if you put in the
>file $HOME/.inputrc a couple line like this

"\e[5~":history-search-backward
"\e[6~": history-search-forward

you'll have PgUp and PgDown acting like 4DOS .
Other 4DOS-like sequence are

"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[2~": kill-whole-line

HOME/END go at start/end of line and INSERT clears the line (you cannot use
ESC like 4DOS and insert was the only key I didn't use.....).

(check the escape sequences they differ depending on the TERM used those
are for the linux terminal)

> This isn't part of 4DOS, but is there any screen recall capability, i.e.
the ability to recall output which has scrolled off the window?
>
> Tim <tswe...@harborhi.com> wrote:
>

Shift-PgUp/Down scroll a couple of screenfuls (it's trickier in xterm as
for some reason shift-PgUp is mapped to Pgup so you have to disable that).

Hope this helps.

Ciao,
GianPiero
--
* Istituto Nazionale di Ottica GianPiero Puccioni *
* Largo E.Fermi 6 E-Mail : g...@fox.ino.it *
* I-50125 Firenze - ITALY =>this space intentionally left non-blank<= *

Christopher Morrone

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

Hans-Joachim Baader (ha...@grumbeer.inka.de) wrote:
: In article <3388161c...@snews.zippo.com>,

: David Morgenlender <dmo...@mediaone.net> wrote:
: >Is there any way to get 4DOS-type capabilities in Linux?
[cut]
: bash has all features of 4DOS 4.0, and much more. I don't know about

: later versions of 4DOS. Ask me what you're missing.
:
: oh, and one restriction: bash doesn't support command logging, AFAIK.
: But this can be done with other programs, eg. script.
[cut]

I'm not sure what you mean by command logging...there's this:

HISTFILE
The name of the file in which command history is
saved. (See HISTORY below.) The default value is
~/.bash_history. If unset, the command history is
not saved when an interactive shell exits.

Or did you mean something different?

Richie Bielak

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

David Morgenlender wrote:
>
> Victor,
>
> I can't find any ".bash_profile" on my system. Does this mean I have to start
> from scratch, or could the file be under a different name, even an example file?
> Where should I place this file?
>

It could be called ".profile". Make sure you do "ls -a".

...richie

--
* ric...@XYZZYnetlabs.net - at home | Richie Bielak *
* ric...@XYZZYcalfp.com - at work | *
* Home page: http://www.netlabs.net/hp/richieb *
* "Fight software piracy, use free software!" (me) *
* (Remove XYZZY from my address before replying) *

Christopher Morrone

unread,
May 23, 1997, 3:00:00 AM5/23/97
to

filipe Arnaldo de Carvalho Valpereiro

unread,
May 24, 1997, 3:00:00 AM5/24/97
to


Wath about the bash shell under linux ??? i Think it is better then
4dos.com

GianPiero Puccioni

unread,
May 24, 1997, 3:00:00 AM5/24/97
to

filipe Arnaldo de Carvalho Valpereiro (c950...@cca.fc.up.pt) wrote:
> GianPiero Puccioni wrote:
> >

[ SNIP. how to set bash to behave like 4DOS ]

>
> Wath about the bash shell under linux ??? i Think it is better then
> 4dos.com

That WAS the bash shell! All my post was about bash setup as the point
was how to get it to act more like 4DOS in a specific area (command
recall).

Dmitry Yaitskov

unread,
May 24, 1997, 3:00:00 AM5/24/97
to

GianPiero Puccioni wrote:
>
> filipe Arnaldo de Carvalho Valpereiro (c950...@cca.fc.up.pt) wrote:
> > GianPiero Puccioni wrote:
> > >
>
> [ SNIP. how to set bash to behave like 4DOS ]
>
> >
> > Wath about the bash shell under linux ??? i Think it is better then
> > 4dos.com
>
> That WAS the bash shell! All my post was about bash setup as the point
> was how to get it to act more like 4DOS in a specific area (command
> recall).

A very nice 4dos feature that I haven't seen in bash is the history of
visited directories - or is it also possible in bash? Except for this,
bash is okay, and thank you GianPiero for you very helpful tips (I am
not the original poster, but after lurking here and using your tips was
able to finally set up bash to my taste).

Cheers,
-Dima.

Andrej Komelj

unread,
May 25, 1997, 3:00:00 AM5/25/97
to

Veksler Michael wrote:

> - DOS' copy *.c *.sqc
> (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").

Antoher one (a little bit nicer but stil ugly):
for n in *.c ; do mv $n `basename $n .c`.sqc ; done

--
Andrej <andrej...@guest.arnes.si>

Mark Heath

unread,
May 26, 1997, 3:00:00 AM5/26/97
to

GianPiero Puccioni (g...@ino.it) wrote:


: Shift-PgUp/Down scroll a couple of screenfuls (it's trickier in xterm as
: for some reason shift-PgUp is mapped to Pgup so you have to disable that).

why not enable the scroll bar in the xterm?
If it isn't already hold down control-middle mouse button and check the
scroll bar option. The scroll bar can be dragged with the middle mouse
button.
The scroll bar can be activated during the invocation of the xterm with the
command line option -sb and for those really long directory listings you
can even set the buffer size -sl <lines>.

--
-- mark heath | signature SPAMMED to avoid base 64
TWFpbCBhZGRyZXNzIG5vdCBpbmNsdWRlZCwgWW91IGp1c3QgbmV2ZXIga25vdyB3aGF0IHRoZXNl
IEJPVFMgYXJlIApjYXBhYmxlIG9mLgo=

Christopher B. Browne

unread,
May 26, 1997, 3:00:00 AM5/26/97
to

On 22 May 1997 07:36:06 +0200, Hans-Joachim Baader
<ha...@grumbeer.inka.de> posted:
>In article <3388161c...@snews.zippo.com>,
>David Morgenlender <dmo...@mediaone.net> wrote:
>>Is there any way to get 4DOS-type capabilities in Linux? For those
>>unfamiliar with 4DOS, it's a great command processor replacement for
>>DOS; it supports aliases, command recall (including the ability to
>>specify the beginning of the commands to recall), command
>>completion, etc. I'm currently using the bash shell. This provides

>>many of the 4DOS features, but not all (at least I've been unable to
>>find them as of yet). This is my first exposure to linux.

>bash has all features of 4DOS 4.0, and much more. I don't know about


>later versions of 4DOS. Ask me what you're missing.

"All" would be something of a reach. There were some of the
interactive history commands in 4DOS that I don't think Bash
replicates, such as the ability to type in part of a command and then
hit (page-up?) to get a little popup list of recent commands matching
the part that was typed in.

>oh, and one restriction: bash doesn't support command logging,
>AFAIK. But this can be done with other programs, eg. script.

There's a fair bit of command logging that bash and other UNIX shells
provide; it varies by shell, and is usually pretty configurable.

The UNIX shell that feels most reminiscent of 4DOS (at least as far as
I can tell) is zsh. It tries to replicate as much as possible the
functionality of *all of* ksh, tcsh, and bash.

It provides the most extensive interactive command/filename completion
system of anything I've ever seen; you type in part of the name, hit
"TAB," and it will fill in as much as possible of the remainder. If
there are multiple options, a second "TAB" will make the system pop up
a list of these options. Thus far, that may sound much like
bash/tcsh. It goes way beyond...

- If you fill in a regular expression and press TAB, zsh will put into
the command line the whole list of items that match the regex.

% ls ~/addresses/*.tex[hit tab]
transforms itself into
% ls /home/cbbrowne/addresses/budget.tex
/home/cbbrowne/addresses/cardfile.tex /home/cbbrowne/addresses/d3.tex
/home/cbbrowne/addresses/onepage.tex
/home/cbbrowne/addresses/oracle.tex /home/cbbrowne/addresses/r3.tex
/home/cbbrowne/addresses/team.tex /home/cbbrowne/addresses/tso.tex

- I haven't used this much, but you can configure completion
differently based on the command:

For instance,

% tex *[tab]
or
% latex *[tab]

could be configured to only find TeX files, e.g. - things that match
*.tex.

% telnet [tab]
could look up the hosts listed in your /etc/hosts file

In effect, zsh can pick the things to be matched from the output of an
arbitrary command. Which is fundamentally more powerful than anything
4DOS had to offer, and (once configured) is really cool.
--
Christopher B. Browne, cbbr...@unicomp.net, chris_...@sdt.com
PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
URL: <http://www.conline.com/~cbbrowne/>
Linux: When one country worth of OS developers just isn't enough...


Christopher B. Browne

unread,
May 26, 1997, 3:00:00 AM5/26/97
to

Binh

unread,
May 27, 1997, 3:00:00 AM5/27/97
to David Morgenlender

On Wed, 21 May 1997, David Morgenlender wrote:

> Is there any way to get 4DOS-type capabilities in Linux? For those unfamiliar
> with 4DOS, it's a great command processor replacement for DOS; it supports
> aliases, command recall (including the ability to specify the beginning of the
> commands to recall), command completion, etc. I'm currently using the bash
> shell. This provides many of the 4DOS features, but not all (at least I've been
> unable to find them as of yet). This is my first exposure to linux.
>

> Dave Morgenlender
> e-mail: dmo...@mediaone.net
>
>

No such thing as DOS on linux, you can get DOS emulator .. Linux is an
entirely different OS.. The equivalent on Linux for DOS i could think
of is Shells (bash/tcsh/csh/ksh/)

and shell can be powerful, u can have alias u can write kickass shell
scripts, way more powerful than DOS batch stuff..and most modern shells
support word completion (much better than that 4dos word completion)

and try man bash or man tcsh or whatver shell u use..that may guide u to a
right direction..

Binh
bi...@cs.adfa.oz.au


G. Sumner Hayes

unread,
May 27, 1997, 3:00:00 AM5/27/97
to

Andrej Komelj <andrej...@guest.arnes.si> wrote:
> Veksler Michael wrote:
>
> > - DOS' copy *.c *.sqc
> > (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").
>
> Antoher one (a little bit nicer but stil ugly):
> for n in *.c ; do mv $n `basename $n .c`.sqc ; done

#!/bin/sh
for n in *.$1 ; do mv $n `basename $n $1`.$2 ; done

Put those two lines in a file called "xmv" somewhere in your
path; chmod 755 xmv. Then,

xmv .c .sqc

should have the effect you're looking for.

TTFN,

Sumner
--
sum...@pathway.no$pam.net <- Spam protected. Remove no$pam.
Apologies to legitimate repliers.

Richard Steiner

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Here in comp.os.linux.misc,comp.os.linux.setup,
Binh <bi...@sealion.cs.adfa.oz.au> spake unto us, saying:

>On Wed, 21 May 1997, David Morgenlender wrote:
>
>> Is there any way to get 4DOS-type capabilities in Linux? For those
>> unfamiliar with 4DOS, it's a great command processor replacement for
>> DOS;
>

>No such thing as DOS on linux, you can get DOS emulator .. Linux is an
>entirely different OS.. The equivalent on Linux for DOS i could think
>of is Shells (bash/tcsh/csh/ksh/)

The original poster was looking for some of 4DOS's shell functionality
under Linux, and I admit that I've also found bash to be relatively weak
in several areas compared to 4DOS/4OS2 -- it has no SELECT equivalent,
no point-and-shoot pull-down selection lists for pattern matching and
command history, etc. Bash is stronger (much stronger) in other areas,
and might be a "better" overall shell, but deficiencies exist.

(Yes -- I know -- if I want more functionality in bash, code it myself.
I will in time, but keep in mind that my own coding experience to this
point is completely outside Intel (or any Unix-bearing) hardware <g>).

>and shell can be powerful, u can have alias u can write kickass shell
>scripts, way more powerful than DOS batch stuff..and most modern shells
>support word completion (much better than that 4dos word completion)

You ever seen 4DOS's F7-key selection at work? :-)

Hans-Joachim Baader

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

In article <slrn5ojnca....@knuth.brownes.org>,

Christopher B. Browne <cbbr...@unicomp.net> wrote:
>"All" would be something of a reach. There were some of the
>interactive history commands in 4DOS that I don't think Bash
>replicates, such as the ability to type in part of a command and then
>hit (page-up?) to get a little popup list of recent commands matching
>the part that was typed in.

Right. I never used that anyway... bash also lacks the commands
to output strings at arbitrary screen positions, to use colors,
boxes and so on. But there are other programs like dialog to fill
this gap.

>In effect, zsh can pick the things to be matched from the output of an
>arbitrary command. Which is fundamentally more powerful than anything
>4DOS had to offer, and (once configured) is really cool.

Sounds interesting. But it probably won't make me switch to zsh.

hjb

Hans-Joachim Baader

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

In article <19D9CACBC0B0A018.6CABD05D...@library-proxy.airnews.net>,

Christopher Morrone <cmor...@gilb87.gilb.udel.edu> wrote:
>I'm not sure what you mean by command logging...there's this:
>Or did you mean something different?

Yes. 4DOS has the ability to record every command you typed. There's
a command 'log' that turns this feature on.

Ed Grimm

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Andrej Komelj wrote:
>
> Veksler Michael wrote:
>
> > - DOS' copy *.c *.sqc
> > (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").
>
> Antoher one (a little bit nicer but stil ugly):
> for n in *.c ; do mv $n `basename $n .c`.sqc ; done

bash:
for n in *.c; do mv $n ${n%.c}.sqc; done

tcsh:
for n in *.c
mv $n $n:r.sqc
end

zsh: either of the above, plus a bunch of others.

--
Ed Grimm
To reply, read the From line, and follow the directions.

This post seems slightly off-topic for setup, so I've redirected
followups to misc only.

Ed Grimm

unread,
May 28, 1997, 3:00:00 AM5/28/97
to Dmitry Yaitskov

Dmitry Yaitskov wrote:
>
> A very nice 4dos feature that I haven't seen in bash is the history of
> visited directories - or is it also possible in bash? Except for this,
> bash is okay, and thank you GianPiero for you very helpful tips (I am
> not the original poster, but after lurking here and using your tips
> was able to finally set up bash to my taste).

Alias cd to pushd. (I think bash has pushd, as one of the few things
from csh...)

pushd also works under tcsh and zsh.

Under zsh, there's an option (autopushd?) which will change the behavior
of both cd and chdir to the same as pushd. Zsh also allows you to use
directorys as commands to cd to that directory, which will have pushd
behavior only if you have autopushd set. You might need to set another
option to do the directory as commands thing, though.

If anyone wants to consolodate all of this jabber, email me at
tg...@cyberramp.net with your questions of how to do such and such 4DOS
feature under UNIX, and I'll list it for all three[1] of the featuritis
shells, and possibly some others. (Pushd also works under csh, but
Linux doesn't have a csh.)

To put it short, everything I've seen mentioned about 4DOS so far is
possible under bash, tcsh, and zsh. The DOS copy *.c *.sqc is possible,
but with difficulty. However, this isn't a 4DOS feature, this is a
feature of target-defined completions rather than shell-defined.

I'm not familiar with the select feature mentioned, nor the
point-and-shoot stuff, so I'd appreciate it if someone were to explain
it to me. I believe I've heard these are possible, but considering I
don't know for certain what they are, I can't do more than pass on the
rumor at this point. (I think I know what they do, and how to do them
under UNIX, but need input before I'll climb out on that limb)

--
Ed Grimm
To reply, read the From line, and follow the directions.

[1] Are there others besides bash, tcsh, and zsh? I know there's a lot
of other shells, I'm familiar with a bunch. But I haven't run into any
others which have such rampant featuritis.

Christopher Morrone

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Hans-Joachim Baader (ha...@grumbeer.inka.de) wrote:
: In article <19D9CACBC0B0A018.6CABD05D...@library-proxy.airnews.net>,
: Christopher Morrone <cmor...@gilb87.gilb.udel.edu> wrote:
: >I'm not sure what you mean by command logging...there's this:
: >Or did you mean something different?

:
: Yes. 4DOS has the ability to record every command you typed. There's
: a command 'log' that turns this feature on.

Well, yeah, thats exactly what this does...You get a file (default is
.bash_history) which has all of the commands that you typed. How is 'log'
different from this?

Try typing "man bash" to read the manual page for bash. Look for
HISTFILE to get started. HISTFILE is a shell variable that can be turned
on by using "set" and turned off with "unset".

Also, if you'd like to log everything that appears on your screen,
including what you type and what a program outputs, look into the "script"
command.

Zach Beane

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

In article <5mfp4l$a...@grumbeer.inka.de>, Hans-Joachim Baader wrote:
>In article <slrn5ojnca....@knuth.brownes.org>,
>Christopher B. Browne <cbbr...@unicomp.net> wrote:
>>"All" would be something of a reach. There were some of the
>>interactive history commands in 4DOS that I don't think Bash
>>replicates, such as the ability to type in part of a command and then
>>hit (page-up?) to get a little popup list of recent commands matching
>>the part that was typed in.
>
>Right. I never used that anyway...

Actually, if you type C-r (Ctrl-R) in bash, it will search backwards
through your command history for a phrase. Very handy.

Zach

--
--
"[On the Internet] the ethic of public gift is highly esteemed. The
wealth of [...] software made freely available for public use is
evidence of that ethos." -- Robin Cover

Christopher Morrone

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Richard Steiner

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Ed Grimm

unread,
May 28, 1997, 3:00:00 AM5/28/97
to Dmitry Yaitskov

Hans-Joachim Baader

unread,
May 28, 1997, 3:00:00 AM5/28/97
to
>I'm not sure what you mean by command logging...there's this:

>Or did you mean something different?

Yes. 4DOS has the ability to record every command you typed. There's
a command 'log' that turns this feature on.

hjb

Hans-Joachim Baader

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

In article <slrn5ojnca....@knuth.brownes.org>,
Christopher B. Browne <cbbr...@unicomp.net> wrote:
>"All" would be something of a reach. There were some of the
>interactive history commands in 4DOS that I don't think Bash
>replicates, such as the ability to type in part of a command and then
>hit (page-up?) to get a little popup list of recent commands matching
>the part that was typed in.

Right. I never used that anyway... bash also lacks the commands


to output strings at arbitrary screen positions, to use colors,
boxes and so on. But there are other programs like dialog to fill
this gap.

>In effect, zsh can pick the things to be matched from the output of an
>arbitrary command. Which is fundamentally more powerful than anything
>4DOS had to offer, and (once configured) is really cool.

Sounds interesting. But it probably won't make me switch to zsh.

hjb

Ed Grimm

unread,
May 28, 1997, 3:00:00 AM5/28/97
to

Andrej Komelj wrote:
>
> Veksler Michael wrote:
>
> > - DOS' copy *.c *.sqc
> > (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").
>
> Antoher one (a little bit nicer but stil ugly):
> for n in *.c ; do mv $n `basename $n .c`.sqc ; done

bash:
for n in *.c; do mv $n ${n%.c}.sqc; done

tcsh:
for n in *.c
mv $n $n:r.sqc
end

zsh: either of the above, plus a bunch of others.

--

Ed Grimm
To reply, read the From line, and follow the directions.

This post seems slightly off-topic for setup, so I've redirected
followups to misc only.


David E. Fox

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <slrn5ojnca....@knuth.brownes.org>, Christopher B. Browne wrote:

>"All" would be something of a reach. There were some of the
>interactive history commands in 4DOS that I don't think Bash
>replicates, such as the ability to type in part of a command and then

You won't get the neato popup, but bash would accomplish the same with
ctrl-r. Hit that key and type in a unique part of the command you want and
the last recent command with that text comes up. Repeated ctrl-rs will
scroll backward through matching command lines.

>The UNIX shell that feels most reminiscent of 4DOS (at least as far as
>I can tell) is zsh. It tries to replicate as much as possible the
>functionality of *all of* ksh, tcsh, and bash.

I played with zsh somewhat, and it's got practically everything: it's
the 'kitchen sink' shell as far as I'm concerned.

>Christopher B. Browne, cbbr...@unicomp.net, chris_...@sdt.com
>PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
>URL: <http://www.conline.com/~cbbrowne/>
>Linux: When one country worth of OS developers just isn't enough...


--
------------------------------------------------------------------------
David E. Fox Tax Thanks for letting me
df...@belvdere.vip.best.com the change magnetic patterns
ro...@belvedere.sbay.org churches on your hard disk.
-----------------------------------------------------------------------

David E. Fox

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <slrn5okumu....@gildor.skypoint.com>, Richard Steiner wrote:

>The original poster was looking for some of 4DOS's shell functionality
>under Linux, and I admit that I've also found bash to be relatively weak
>in several areas compared to 4DOS/4OS2 -- it has no SELECT equivalent,

It's been a while since I last used 4DOS (probably >3 years) so I'm not
exactly sure what select does (doesn't it popup a mini filelisting so
you can pick filenames and those filenames get fed into your command?) -
and bash doesn't have that as such, but you could probably get something
close with some shell scripts.

>no point-and-shoot pull-down selection lists for pattern matching and
>command history, etc. Bash is stronger (much stronger) in other areas,
>and might be a "better" overall shell, but deficiencies exist.

I use ctrl-r (backward history search) a _lot_, and in my opinion it
accomplishes the same thing as 4dos's popup historu does. One doesn't
need the popup in any event, and once you get used to how bash does things
vs. 4dos, it becomes even more useful.

In my view, bash is much more generalized - 4dos is still a DOS thing, and
is inflexible. For instance, 4dos doesn't have backticks (`foo`) where
(for instance) the output of a command can be stuck in an environmentv
variable, or be piped into another command, etc. This is real flexibility,
and you only get that with Unix style shells.

I don't really mean to bash (groan) 4dos - it's a must have if you are
stuck in the DOS world, and the authors have done one hell of a
job putting it together, putting in some very useful Unixisms, and
attempting to maintain backward compatibility with that command.com
stuff.

> -Rich Steiner >>>---> rste...@skypoint.com >>>---> Bloomington, MN
> Written online using slrn 0.9.3.2 and fte 0.45 for Linux!
> The Theorem Theorem: If If, Then Then.

Richard Steiner

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

Here in comp.os.linux.misc,comp.os.linux.setup,
David E. Fox <df...@belvdere.vip.best.com> spake unto us, saying:

>It's been a while since I last used 4DOS (probably >3 years) so I'm not
>exactly sure what select does (doesn't it popup a mini filelisting so
>you can pick filenames and those filenames get fed into your command?)

Yeah, it's basically a graphical list of the files matching the stated
wildcard, and you use the spacebar to do a point-and-shoot selection of
the subset you want to perform teh command on.

>and bash doesn't have that as such, but you could probably get something
>close with some shell scripts.

I suspect one could approximate everything ... in time. :-)

>I use ctrl-r (backward history search) a _lot_, and in my opinion it
>accomplishes the same thing as 4dos's popup historu does. One doesn't
>need the popup in any event, and once you get used to how bash does
>things vs. 4dos, it becomes even more useful.

Much of it is familiarity, obviously. I've used 4DOS since 1990, and
4OS2 since 1993, so I'm more than a little familiar with its methods,
and bash is a little strange. :-) It's a good shell, though, and
I'm slowly learning to appreciate its ways.

>In my view, bash is much more generalized - 4dos is still a DOS thing,
>and is inflexible.

It's actually a DOS (4DOS), OS/2 (4OS2), and NT (4NT) thing, and it's
a bit more capable than most people realize.

>For instance, 4dos doesn't have backticks (`foo`) where (for instance)

>the output of a command can be stuck in an environment variable, or be


>piped into another command, etc.

In 4DOS, I can do FOO | input %%BAR, and put the results of command FOO
in the variable BAR. Piping is very flexible, including the TEE and Y
fittings and many other variations. :-) But I'm not a batchfile guru.

>This is real flexibility, and you only get that with Unix style shells.

I would respectfully disagree. Unix-style shells are very capable, and
perhaps in general the MOST capable, but I think you need to spend time
going through the 4DOS manual. It does a LOT of things in a very Unix-
like way with a DOS touch, and the latter bit means "interface".

Rather than continue this, I guess I'll summarize by saying that I miss
several aspects of 4DOS/4OS2, but I'll be doing my best to recreate
them here using native tools. It can (will) be done.

>I don't really mean to bash (groan) 4dos - it's a must have if you are
>stuck in the DOS world, and the authors have done one hell of a job
>putting it together, putting in some very useful Unixisms, and
>attempting to maintain backward compatibility with that command.com
>stuff.

Heh. I agree. COMMAND.COM is evil incarnate. :-) And CMD.EXE isn't
all that great in OS/2, either. At least OS/2 has REXX...

--

G. Sumner Hayes

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

Richard Steiner <rste...@skypoint.com> wrote:
>
> >For instance, 4dos doesn't have backticks (`foo`) where (for instance)
> >the output of a command can be stuck in an environment variable, or be
> >piped into another command, etc.
>
> In 4DOS, I can do FOO | input %%BAR, and put the results of command FOO
> in the variable BAR. Piping is very flexible, including the TEE and Y
> fittings and many other variations.

Pipes are cool, but backticks make them cooler. For instance:

mv $i `echo $i | tr a-mn-z n-za-m`

(Probably possible with 4DOS, but since you're just learning bash I thought
I'd show you a somewhat useful example to learn a useful feature).

zsh is mostly downward compatible with bash; I recommend switching to
zsh as soon as possible.

TTFN,

Sumner

Hans-Joachim Baader

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <5mign9$mf9$1...@news.udel.edu>,

Christopher Morrone <cmor...@gilb87.gilb.udel.edu> wrote:
>Well, yeah, thats exactly what this does...You get a file (default is
>.bash_history) which has all of the commands that you typed. How is 'log'
>different from this?

For 4DOS, Logging and command line history are different things. I don't
remember the format of the log file, but it includes at least a time
stamp and the command executed.

>Try typing "man bash" to read the manual page for bash. Look for

Don't get boring. I know how to use the man pages and have browsed
the bash page many times. But I don't remember the features I don't
use regularly.

>Also, if you'd like to log everything that appears on your screen,
>including what you type and what a program outputs, look into the "script"
>command.

That's exactly what I wrote a few days before.

Richard Steiner

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

Here in comp.os.linux.misc,comp.os.linux.setup,
David E. Fox <df...@belvdere.vip.best.com> spake unto us, saying:

>It's been a while since I last used 4DOS (probably >3 years) so I'm not
>exactly sure what select does (doesn't it popup a mini filelisting so
>you can pick filenames and those filenames get fed into your command?)

Yeah, it's basically a graphical list of the files matching the stated
wildcard, and you use the spacebar to do a point-and-shoot selection of
the subset you want to perform teh command on.

>and bash doesn't have that as such, but you could probably get something
>close with some shell scripts.

I suspect one could approximate everything ... in time. :-)

>I use ctrl-r (backward history search) a _lot_, and in my opinion it
>accomplishes the same thing as 4dos's popup historu does. One doesn't
>need the popup in any event, and once you get used to how bash does
>things vs. 4dos, it becomes even more useful.

Much of it is familiarity, obviously. I've used 4DOS since 1990, and
4OS2 since 1993, so I'm more than a little familiar with its methods,
and bash is a little strange. :-) It's a good shell, though, and
I'm slowly learning to appreciate its ways.

>In my view, bash is much more generalized - 4dos is still a DOS thing,
>and is inflexible.

It's actually a DOS (4DOS), OS/2 (4OS2), and NT (4NT) thing, and it's
a bit more capable than most people realize.

>For instance, 4dos doesn't have backticks (`foo`) where (for instance)


>the output of a command can be stuck in an environment variable, or be
>piped into another command, etc.

In 4DOS, I can do FOO | input %%BAR, and put the results of command FOO
in the variable BAR. Piping is very flexible, including the TEE and Y

David E. Fox

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <slrn5ojnca....@knuth.brownes.org>, Christopher B. Browne wrote:

>"All" would be something of a reach. There were some of the
>interactive history commands in 4DOS that I don't think Bash
>replicates, such as the ability to type in part of a command and then

You won't get the neato popup, but bash would accomplish the same with
ctrl-r. Hit that key and type in a unique part of the command you want and
the last recent command with that text comes up. Repeated ctrl-rs will
scroll backward through matching command lines.

>The UNIX shell that feels most reminiscent of 4DOS (at least as far as
>I can tell) is zsh. It tries to replicate as much as possible the
>functionality of *all of* ksh, tcsh, and bash.

I played with zsh somewhat, and it's got practically everything: it's
the 'kitchen sink' shell as far as I'm concerned.

>Christopher B. Browne, cbbr...@unicomp.net, chris_...@sdt.com
>PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
>URL: <http://www.conline.com/~cbbrowne/>
>Linux: When one country worth of OS developers just isn't enough...

David E. Fox

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

In article <slrn5okumu....@gildor.skypoint.com>, Richard Steiner wrote:

>The original poster was looking for some of 4DOS's shell functionality
>under Linux, and I admit that I've also found bash to be relatively weak
>in several areas compared to 4DOS/4OS2 -- it has no SELECT equivalent,

It's been a while since I last used 4DOS (probably >3 years) so I'm not


exactly sure what select does (doesn't it popup a mini filelisting so

you can pick filenames and those filenames get fed into your command?) -


and bash doesn't have that as such, but you could probably get something
close with some shell scripts.

>no point-and-shoot pull-down selection lists for pattern matching and


>command history, etc. Bash is stronger (much stronger) in other areas,
>and might be a "better" overall shell, but deficiencies exist.

I use ctrl-r (backward history search) a _lot_, and in my opinion it


accomplishes the same thing as 4dos's popup historu does. One doesn't
need the popup in any event, and once you get used to how bash does things
vs. 4dos, it becomes even more useful.

In my view, bash is much more generalized - 4dos is still a DOS thing, and
is inflexible. For instance, 4dos doesn't have backticks (`foo`) where


(for instance) the output of a command can be stuck in an environmentv

variable, or be piped into another command, etc. This is real flexibility,


and you only get that with Unix style shells.

I don't really mean to bash (groan) 4dos - it's a must have if you are


stuck in the DOS world, and the authors have done one hell of a
job putting it together, putting in some very useful Unixisms, and
attempting to maintain backward compatibility with that command.com
stuff.

> -Rich Steiner >>>---> rste...@skypoint.com >>>---> Bloomington, MN


> Written online using slrn 0.9.3.2 and fte 0.45 for Linux!
> The Theorem Theorem: If If, Then Then.

Hans-Joachim Baader

unread,
May 29, 1997, 3:00:00 AM5/29/97
to

Richard Steiner

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

Here in comp.os.linux.misc,comp.os.linux.setup, G. Sumner Hayes
<sum...@pathway.net> spake unto us, saying:

>Richard Steiner <rste...@skypoint.com> wrote:
>
>Pipes are cool, but backticks make them cooler. For instance:
>
>mv $i `echo $i | tr a-mn-z n-za-m`
>
>(Probably possible with 4DOS, but since you're just learning bash I thought
>I'd show you a somewhat useful example to learn a useful feature).

Hmmm. That *is* nice. Fairly clean syntax, also. :-)

>zsh is mostly downward compatible with bash; I recommend switching to
>zsh as soon as possible.

I've heard that before <g>. Guess I'll install and explore it...

--

Christopher B. Browne

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

On 28 May 1997 01:01:41 +0200, Hans-Joachim Baader <ha...@grumbeer.inka.de>
posted:
>In article <slrn5ojnca....@knuth.brownes.org>,

>Christopher B. Browne <cbbr...@unicomp.net> wrote:
>>"All" would be something of a reach. There were some of the
>>interactive history commands in 4DOS that I don't think Bash
>>replicates, such as the ability to type in part of a command and then
>>hit (page-up?) to get a little popup list of recent commands matching
>>the part that was typed in.

>Right. I never used that anyway... bash also lacks the commands
>to output strings at arbitrary screen positions, to use colors,
>boxes and so on. But there are other programs like dialog to fill
>this gap.

I received a somewhat "snarky" letter from one person indicating that I
was drastically wrong, and that there are indeed lots of capabilities.
Which is generally true. (Were I the sender of the letter, I'd like to
*think* that I would have been somewhat more gentle about the correction.)

That being said, the fact that 4DOS can assume the presence of sundry PC
BIOS "stuff" means that it can more readily draw pretty boxes around such
things than shells that may run on arbitrarily-unpowerful ASCII terminals.
(Or worse. I once had the unique experience of connecting to a UNIX
account via VM/CMS, and reading news on a 3270 terminal. Painful,
painful experience. Emacs certainly couldn't run; I don't think vi was
too happy either. But I digress...)

In short, UNIX terminal-based shells can't assume too much about terminal
capabilities, which limits how "pretty" you can expect "history popup"
to get.

>>In effect, zsh can pick the things to be matched from the output of an
>>arbitrary command. Which is fundamentally more powerful than anything
>>4DOS had to offer, and (once configured) is really cool.
>
>Sounds interesting. But it probably won't make me switch to zsh.

I haven't configured zsh to do this sort of thing; what I *do* find
compelling are:

a) Powerful dynamic command and filename completion and expansion, and
b) The combination of fairly clean versions of both csh *and* ksh
syntaxes. I got used to csh's "foreach" command for much of my
looping; zsh lets me keep it, and get the "good stuff" from ksh and
Bourne shell.

--

Christopher B. Browne, cbbr...@unicomp.net, chris_...@sdt.com
PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16

URL: <http://home.unicomp.net/~cbbrowne/>

Christopher B. Browne

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

On 28 May 1997 00:55:41 +0200, Hans-Joachim Baader <ha...@grumbeer.inka.de>
posted:
>In article
<19D9CACBC0B0A018.6CABD05D...@library-proxy.airnews.net>,

>Christopher Morrone <cmor...@gilb87.gilb.udel.edu> wrote:
>>I'm not sure what you mean by command logging...there's this:
>>Or did you mean something different?

>Yes. 4DOS has the ability to record every command you typed. There's
>a command 'log' that turns this feature on.

Virtually any UNIX shell more sophisticated than "ash" provides this
capability; there is typically some set of "history" environment
variables that will determine the number of previously typed commands
that will be kept.

For instance, in zsh, $HISTSIZE determines how many commands are kept
in memory; $SAVEHIST determines how many will be saved in the history
file specified using $HISTFILE. Setting $EXTENDED_HISTORY will make
zsh save more information (start/end times) as well.

In Bash, you get $HISTFILE, and $HISTFILESIZE, which do roughly
equivalent things.

And hmmm... ksh provides $HISTFILE and $HISTSIZE... Might that be
intended to do the same thing :-)?

zsh and Bash provide a variety of additional options so you could
customize the way history items are recognized; I'm not sure they
often get used.

Veksler Michael

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

Andrej Komelj (andrej...@guest.arnes.si) wrote:
: Veksler Michael wrote:

: > - DOS' copy *.c *.sqc
: > (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").

: Antoher one (a little bit nicer but stil ugly):
: for n in *.c ; do mv $n `basename $n .c`.sqc ; done

I have tried to reconstruct a perl script I once had. It used to do
it in a "neat" way. The resulting script was so ugly, that I decided
to write the whole thing in C.
So as a result I got a 600 line C program that moves files cleanly:
xmv #.cpp #.cc <-- change .cpp extensions to .cc
xmv #Cache#.cpp #Assoc#.cc <-- rename DiskCacheSys.cpp to DiskAssocSys.cc
xmv -s %@ %@.cpp %@.cc <-- use an alternate separator (instead `#')

I don't want to waste time looking for the right location to upload and
announce it,
unless I get some positive responses.
I have constructed a home page for this purpose:
http://techunix.technion.ac.il/~mveksler

Enjoy (or not)

Michael

Christopher B. Browne

unread,
May 31, 1997, 3:00:00 AM5/31/97
to

David E. Fox

unread,
Jun 1, 1997, 3:00:00 AM6/1/97
to

In article <slrn5oq59v....@gildor.skypoint.com>, Richard Steiner wrote:

>Here in comp.os.linux.misc,comp.os.linux.setup,
>David E. Fox <df...@belvdere.vip.best.com> spake unto us, saying:
>

>>In my view, bash is much more generalized - 4dos is still a DOS thing,
>>and is inflexible.
>

>It's actually a DOS (4DOS), OS/2 (4OS2), and NT (4NT) thing, and it's
>a bit more capable than most people realize.

Well, I've only used 4DOS. I wonder how well it does on OS/2 and NT.
For instance, does it spawn new processes when you use pipes?

>>For instance, 4dos doesn't have backticks (`foo`) where (for instance)

>>the output of a command can be stuck in an environment variable, or be


>>piped into another command, etc.
>

>In 4DOS, I can do FOO | input %%BAR, and put the results of command FOO
>in the variable BAR. Piping is very flexible, including the TEE and Y
>fittings and many other variations. :-) But I'm not a batchfile guru.

I forgot that you could do that. But you're still stuck a bit with
the DOS style batch language, but btm is certainly a big leap over
command.com BATch files, of course. Last I looked (1992ish) it did
not yet have case, but it had quite a bit of unix shell like features.

>>This is real flexibility, and you only get that with Unix style shells.
>

>I would respectfully disagree. Unix-style shells are very capable, and
>perhaps in general the MOST capable, but I think you need to spend time
>going through the 4DOS manual. It does a LOT of things in a very Unix-
>like way with a DOS touch, and the latter bit means "interface".

4DOS most likely has improved a good deal since I last used it. I
do think the Unix shell does certain things more cleanly.

> -Rich Steiner >>>---> rste...@skypoint.com >>>---> Bloomington, MN
> Written online using slrn 0.9.3.2 and fte 0.45 for Linux!
> The Theorem Theorem: If If, Then Then.

David E. Fox

unread,
Jun 2, 1997, 3:00:00 AM6/2/97
to

In article <slrn5ourih....@knuth.brownes.org>, Christopher B. Browne wrote:

>In short, UNIX terminal-based shells can't assume too much about terminal
>capabilities, which limits how "pretty" you can expect "history popup"
>to get.

That's true. Then again, bash (or other shells) will run on any
terminal I find in dumpsters :) whilst 4dos will only run on a DOS
console.

Granted you lose the fanciness of popups and such, but as a rule, I
don't think not having them impedes productivity.

By the way, the 'fancy' popups and such aren't BIOS at all, but
PC line-drawing characters. I've wondered sometimes why, since
Linux is a PC Unix, why it can't look more like a PC from time
to time rather than emulate, say, a VT-100 or something.

Of course, some programs do take advantage of the PC console
stuff, such as the Redhat install tools. (I like those buttons
that actually look like they're being depressed).

>Christopher B. Browne, cbbr...@unicomp.net, chris_...@sdt.com
>PGP Fingerprint: 10 5A 20 3C 39 5A D3 12 D9 54 26 22 FF 1F E9 16
>URL: <http://home.unicomp.net/~cbbrowne/>
>Linux: When one country worth of OS developers just isn't enough...
>

Jensen

unread,
Jun 6, 1997, 3:00:00 AM6/6/97
to

David E. Fox (df...@belvdere.vip.best.com) wrote:

> Granted you lose the fanciness of popups and such, but as a rule, I
> don't think not having them impedes productivity.

We don't always need colors et al to make it "pretty." vt-100 can very
well draw an outlined bold window with a scrollable history.

> to time rather than emulate, say, a VT-100 or something.

I would have to agree. Plus, BTW, it is not just PCs that do the
extended character sets. IBM has (to many dismays I am guessing) with
their RS/6000s supported the extended sets. SGI, if I remember,
supports, through their prop. xterm shell window, the extended
characters. Plus, any decent program will check the termcap or
terminal libraries to see the terminal capabilites, anyway.

J. S. Jensen
jsje...@massive.Mines.EDU


Ed Grimm

unread,
Jun 6, 1997, 3:00:00 AM6/6/97
to df...@belvdere.vip.best.com

David E. Fox wrote:
>
> By the way, the 'fancy' popups and such aren't BIOS at all, but
> PC line-drawing characters. I've wondered sometimes why, since
> Linux is a PC Unix, why it can't look more like a PC from time
> to time rather than emulate, say, a VT-100 or something.

But to re-create the screen after it finishes requires having access to
what was under it. Your standard unix terminal doesn't have access to
that information anywhere. It can come from too many sources, and
there's no access from the mainframe to the terminal screen.
Admittedly, the tty driver could contain screen information as well, but
that would have you double processing your output, and as you pointed
out, they're not that productively useful.

In my attempts at duplicating any functionality members of the newsgroup
would mail me about from 4DOS, I've found I can create these popups from
the Linux console, thanks to /dev/vc*, and I can do the popups in xterms
and kterms, thanks to terminal 'tite'. Anything else, and I mess up the
screen horribly.

Sergiu Partenie

unread,
Jun 7, 1997, 3:00:00 AM6/7/97
to

On 25 May 1997, Andrej Komelj wrote:

> Veksler Michael wrote:
>
> > - DOS' copy *.c *.sqc
> > (nicer than: ls *.c | sed 's/\.c$//' | xargs -i mv "{}.c" "{}.sqc").
>
> Antoher one (a little bit nicer but stil ugly):
> for n in *.c ; do mv $n `basename $n .c`.sqc ; done
>

use mc and F5 :-)

0 new messages