| Deutsch English Français Italiano |
|
<trlalk-d5q.ln1@ID-313840.user.individual.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Geoff Clare <geoff@clare.See-My-Signature.invalid> Newsgroups: comp.unix.shell Subject: Re: [ksh93] defunct 'fc' command? Date: Mon, 1 Jul 2024 14:00:13 +0100 Lines: 40 Message-ID: <trlalk-d5q.ln1@ID-313840.user.individual.net> References: <v5trcn$10nuj$1@dont-email.me> Reply-To: netnews@gclare.org.uk Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net MfpXSyQwHuXw8WpC665UhQHyRyehCarRk0OxVVCjirPAot8SS/ X-Orig-Path: ID-313840.user.individual.net!not-for-mail Cancel-Lock: sha1:grpAfqfZQKy/yqO92kcgTj/ckRQ= sha256:wlSFLaSWVEpxcCJAm9Ts9Rwbk7XF2wDKzipp3T2c+Y4= User-Agent: Pan/0.154 (Izium; 517acf4) Bytes: 1935 Janis Papanagnou wrote: > I noticed that 'fc' doesn't seem to work on my Limux platform (neither > with ksh93u+ nor with ksh93u+m). Usually I use that built-in command > only as 'fc -l' (to list the history entries), and omitting the '-l' > should execute these commands. Alas, 'fc <from> <to>' doesn't work; > for example > > $ fc -l 1013 1015 > 1013 ls X > 1014 ls Y > 1015 ls Z > $ fc 1013 1015 > 15 > ^C > ? > ^Z[1] + Stopped fc 1013 1015 > $ kill %% > [1] + Terminated fc 1013 1015 > > > Is that an issue in my environment (or on my platform), or a bug? It's an issue with your expectation. By default, fc starts an editor. Presumably you don't have FCEDIT set, as your output shows the default editor (ed) was used; it was ed that wrote the "15" and the "?". If you just want the commands executed, you can specify an editor that does nothing: fc -e true 1013 1015 fc -e : 1013 1015 Or, if you only want to execute one command, you can use -s (without specifying a substitution). This is all POSIX standard stuff. -- Geoff Clare <netnews@gclare.org.uk>