LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News
User Name
Password
Syndicated Linux News This forum is for the discussion of Syndicated Linux News stories.

Notices


Reply
  Search this Thread
Old 06-10-2009, 06:50 AM   #1
LXer
LXer NewsBot
 
Registered: Dec 2005
Posts: 107,545

Rep: Reputation: 117Reputation: 117
LXer: 6 things that I miss in bash


Published at LXer:

What is the most frequently used piece of software on your computer? Hereís one program that holds one of the highest place in my list of most frequently used programs. I am talking aboutÖ bash. In case you donít know, this is the program behind large portion of the Linux command line. It is the program that actually makes majority of work turning Linux command line into such a magnificent tool it is.

Read More...
 
Old 06-10-2009, 10:56 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Oh come on ... seriously now, "Fix typos", are you crazy ? The blogger is obviously a n00b.

dd if=/dev/zero of=/dev/sdc

# shell decides to fix your typo, because /dev/sdc is not found

dd if=/dev/zero of=/dev/sda

 
Old 06-10-2009, 06:17 PM   #3
alexander.sandler
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by H_TeXMeX_H View Post
Oh come on ... seriously now, "Fix typos", are you crazy ? The blogger is obviously a n00b.

dd if=/dev/zero of=/dev/sdc

# shell decides to fix your typo, because /dev/sdc is not found

dd if=/dev/zero of=/dev/sda

You didn't read the article carefully enough. I address the problem you mentioned in the article. Read it.
Read comments - someone already made the same mistake as you did today and I explained my point more thoroughly. At least he didn't call me a noob.
 
Old 06-11-2009, 03:03 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
I agree with their suggestions, if you need all this try zsh.

But either way, if you actually do find a 'fix typo' solution (which is n00bish any way you look at it), you will find that it isn't worth it. It will greatly over-complicate things and can lead to catastrophic error.

Mostly the things you want add unneeded complication, and provide an unneeded solution.

I apologize for calling you a n00b ...
 
Old 06-11-2009, 04:21 PM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Wouldn't tab completion get around the typo issue?
 
Old 06-11-2009, 04:50 PM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
I would think so ... but I guess he wants more ...
 
Old 06-12-2009, 09:25 AM   #7
alexander.sandler
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
The point is that tab completion should not only complete, but fix typos. Here's an example. Lets say /dev/sdc does not exists, yet you did typed /dev/sdc. Command that you want to run, whatever it is, should return an error and now you have to go one command back in history to the /dev/sdc command.

Normally, you will have to delete the 'c' in /dev/sdc and press tab to receive list of your options. What I suggested spears the 'c' character and instead fixes the file name to /dev/sda (or whatever) - but only after I press TAB key.
Another example is 'ls- la'. When you type something like this, obviously this is not what you mean. What is you mean is 'ls -la'. Bash can fix this kinds of typos when you ask it to do so (by typing TAB key). Actually I think zsh already does something like this.

Of course there are more things of this kind that bash can do to help.
 
Old 06-12-2009, 09:38 PM   #8
DragonSlayer48DX
Registered User
 
Registered: Dec 2006
Posts: 1,454
Blog Entries: 1

Rep: Reputation: 74
Quote:
Originally Posted by alexander.sandler View Post
The point is that tab completion should not only complete, but fix typos. Here's an example. Lets say /dev/sdc does not exists, yet you did typed /dev/sdc. Command that you want to run, whatever it is, should return an error and now you have to go one command back in history to the /dev/sdc command.

Normally, you will have to delete the 'c' in /dev/sdc and press tab to receive list of your options. What I suggested spears the 'c' character and instead fixes the file name to /dev/sda (or whatever) - but only after I press TAB key.
Suppose you have /dev/sda & /dev/sdb installed, and it chooses the wrong one? Too many possible failures to mention, IMHO. Why not just double-check your spelling before executing the command?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A couple things I miss from windows anix Linux - Desktop 7 10-26-2008 05:11 PM
LXer: Things you miss with GNU/Linux LXer Syndicated Linux News 0 05-02-2008 07:11 PM
LXer: Switching From OS X to Ubuntu: 10 Things I Miss LXer Syndicated Linux News 0 10-21-2007 11:10 AM
of all the things ive lost i miss my mind the most KOA Linux - Hardware 3 09-07-2003 11:18 PM
things I miss.. supafly Linux - General 15 12-05-2001 06:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - News > Syndicated Linux News

All times are GMT -5. The time now is 03:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration