HP3000-L Archives

February 2002, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Tue, 5 Feb 2002 22:08:58 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
Yes, in bash, you can "fc -s ABC=BCD grep".  The substitutions have to come
before the command.  It is common to have
alias r='fc -s'
in your .profile


----- Original Message -----
From: <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, February 05, 2002 5:04 PM
Subject: POSIX Shell questions


> I have a couple of questions of my own.
>
> The POSIX shell lets me repeat a particular command using r. So, for
> instance, if I know that I want to repeat my last grep, but anything in
the
> command line from ABC to BCD, I can r grep ABC=BCD. Is there an equivalent
> in Linux?
>
> The second question would be best solved in perl, but I can take a shell
> solution. I have a somewhat variable list of files, *XYZ.txt. I do not
want
> any extension on these files (adding an extension seems easy enough). Can
> they be renamed copied to a basename with a single command? I'm looking
for
> something short of some clever scripting which would build a list of
names,
> parse each to derive the basename without the extension, and build a cp or
> mv command, although if that's what it takes, then I'm stuck with that.
>
> Greg Stigers
> http://www.cgiusa.com
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2