mainThe GNU Bourne-Again SHell - Support: sr #108336, subtle differences between ksh and...

 
 

sr #108336: subtle differences between ksh and bash

Submitter:  dave kerns <dtkerns>
Submitted:  Sat 06 Jul 2013 12:30:37 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 13 Nov 2015 07:57:15 PM UTC, comment #1: 

The two-argument cd is trivial to do with a shell function.  There are several examples provided in the bash distribution (under the `examples' subdirectory).  It's so easy that there doesn't seem to be any reason to put it into bash itself.

The ^O binding is in bash and has been for many years.  Make sure it's not being overridden by some stty key binding.

Chet Ramey <chet>
Group administrator
Sat 06 Jul 2013 12:30:37 AM UTC, original submission:  

I'm a long time ksh user, slowly being pushed to use bash. There are two significant (to me) features that bash is missing. I'm curious if they were intentionally left out...


1) cd xxx yyy # in ksh, performs string substitution from xxx to yyy on the cwd, either xxx or yyy may contain slashes '/'

very useful for view-pathing: cd $BASE $DEV # takes you to the same relative place in a tree, but creativity abounds! As far I can tell, bash only takes (at most) one argument to cd

2) control-O - (from a previous command search) execute command (appending it to the history, again) and brings up the next command in the history file ready to edited (and also be executed with another control-O)

for control-flowed multi-line commands, bash joins them, making it possible to edit the commands in a for loop, but if the multi-line commands are not in an if/while/for construct, you're out of luck.

for details on both of these, see the ksh man page! :)

dave kerns <dtkerns>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by dtkerns (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code