LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > goumba
User Name
Password

Notices


  1. Old Comment

    People want their problem solved, not another distro.

    Quote:
    I will not disagree with you there. However it is occurring way too often that the reason the other distribution is being suggested for reasons other than directly addressing the OPs problem.
    I must agree with this statement. We all have our favorites. Sometimes persons suggest their favorites just because, not because the suggestion addresses the issue.
    Posted 02-25-2017 at 10:08 PM by frankbell frankbell is offline
  2. Old Comment

    People want their problem solved, not another distro.

    Quote:
    Originally Posted by beachboy2 View Comment
    goumba,

    You say that “people want their problem solved, not another distro”.

    Often the problem can be solved using the existing distro but in other cases
    it may not be possible to do so, or it will be extremely difficult for a novice Linux user.

    In many cases the installed Linux distro may be totally unsuitable because:
    I will not disagree with you there. However it is occurring way too often that the reason the other distribution is being suggested for reasons other than directly addressing the OPs problem. While what you say is true, I'm addressing the replies that go like:

    Quote:
    OP: I can't install the firmware for my device on distribution X
    Reply: You don't want distribution X. It's based on Fedora. You want distribution Y based on Debian and uses a minimal desktop.
    Meanwhile the OP can obtain and install said firmware on their chosen distro with a little extra effort, rather than a whole new distro.

    As you see, no where in my example has the problem been addressed. Just stated "get a new distro" with other reasons stated. This is as likely to chase someone away as having to dive into the command line, AFAIC.
    Posted 02-25-2017 at 06:27 AM by goumba goumba is offline
    Updated 02-25-2017 at 06:29 AM by goumba
  3. Old Comment

    People want their problem solved, not another distro.

    I agree with both goumba and beachboy2. I think each one has a point, though I lean slightly towards goumba.

    I think helping a poster solve a problem on the existing install should be the first goal, but sometimes you can tell that a poster is like a person who wants to pull a 19-foot (6 meter) trailer boat with a Kia Soul. The only answers there are, "Ditch the Soul, get a proper tow-vehicle; or forget about the boat."

    Just my two cents.
    Posted 02-20-2017 at 06:46 PM by frankbell frankbell is offline
  4. Old Comment

    People want their problem solved, not another distro.

    goumba,

    You say that “people want their problem solved, not another distro”.

    Often the problem can be solved using the existing distro but in other cases
    it may not be possible to do so, or it will be extremely difficult for a novice Linux user.

    In many cases the installed Linux distro may be totally unsuitable because:

    1. The user’s hardware is old and/or low-powered.

    2. There is a bug in that particular distro, but not in an alternative one.

    3. It has a relatively old kernel compared to another distro which uses the latest kernel.

    4. It is a FOSS distro and it is difficult or virtually impossible to add non-free firmware/software packages etc.

    5. A required driver may already be installed in an alternative distro and it may very difficult (e.g. lots of use of the command line) or impossible to add this driver to the existing distro.

    6. Last, but not least, a fresh installation of a more suitable distro takes a much shorter time than a Linux novice would take trying to deal with the complexities of the command line in the existing distro.

    Your suggestion is for people to keep their existing distro regardless of any other considerations and keep banging their heads against a brick wall.
    Posted 02-19-2017 at 09:06 AM by beachboy2 beachboy2 is offline
  5. Old Comment

    People want their problem solved, not another distro.

    YES!!!! This is -burried- here: (bold&font=4 on the NOT are mine)
    http://www.linuxquestions.org/linux/...linux_question
    Quote:
    Don't use that distro - use distro xyz instead.
    ... it does not matter how ill informed you believe the users choice of distro is, if their choice is not directly appropriate to their problem do not suggest changing it. If you want to convince people which distro is best, there is a thread for you.
    An "exception"?: [you were 'here'! but no conclusion yet]
    http://www.linuxquestions.org/questi...ml#post5670737

    p.s. I'll keep this in mind, when I'm tempted to 'illegally' say:
    "don't install linux!!: keep Win$$ undisturbed: use VBox!"
    Posted 02-18-2017 at 12:58 AM by Jjanel Jjanel is offline
    Updated 02-20-2017 at 02:31 AM by Jjanel
  6. Old Comment
    Posted 09-28-2016 at 09:54 AM by vmccord vmccord is offline
  7. Old Comment

    A little background on myself, and thoughts to a new 'blog-column'

    Ya know guys, thanks. I had let life get in the way again and got sidetracked. Six months later I doubt you'll even read this, but thank you.

    I know a blog is to "scratch an itch"... my "itch" as with Linux as well as in life is to help others. I'm not talking some grand sacrifice type of help, but just the little things that normally no one would think about, such as in this case: helping someone to discover something new about their PC that would be *useful*. This case, I figured I'd get some use as well, learning new things myself.

    I'm on my way to Best Buy to get myself a cheap netbook for my long commutes, in which I'll be able to play with this idea more.

    As far as the widespread knowledge of these blogs... yeah, I hate to say they probably go unnoticed as they're at the bottom of the menu. How many people really look there?
    Posted 09-27-2016 at 09:17 AM by goumba goumba is offline
    Updated 09-27-2016 at 09:18 AM by goumba
  8. Old Comment

    A little background on myself, and thoughts to a new 'blog-column'

    I balance my computer time with outdoor projects to keep on a even keel with how much time I spend online.

    For example. This weekend has been re-furbish 1950's Youngstown Ohio Steel Kitchen cabinets weekend .

    I picked them up for free and they are in sad rusted condition.
    Marble stone tops and a hammered Rustoleum spray can paint job with white interiors for shelves and doors should tune them up quite nicely.

    For the Linux stuff. I keep a pastebin account for my own documentation.

    I used to keep a blog
    http://yatsite.blogspot.com/

    But after becoming a distro team member. I decided I needed to give something up. So the blog was chosen.

    My blog here is not so serious as my old one. I post stuff there when

    Quote:
    to scratch an itch
    Like mentioned previously above. So I do not take the one I have here as serious. So not as much work as my previous blog goes into doing mine here.

    Which gives me time to read and reply to yours.
    Posted 03-27-2016 at 11:31 AM by rokytnji rokytnji is offline
  9. Old Comment

    A little background on myself, and thoughts to a new 'blog-column'

    Well, your post has already got double the views that my first blog-post got, so there's clearly some interest even if no one has responded yet. Personally, I've never used 'pv'. I have recently discovered 'xclip' though and that's been a game changer for me and my workflows.

    Most folks write blog posts to scratch an itch. If writing a blog posts pleases or entertains you then go for it! I doesn't really matter if no one reads them... which is probably just as well as I don't think the LQ blog section is really all that active.
    Posted 03-26-2016 at 09:31 AM by GazL GazL is offline
  10. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    It seems that it's virtually impossible to make a script get a strictly literal "$@" with quotes and everything, quotes have to be escaped.

    For folders or files with spaces between quotes, though, it may be of some help to use:

    command="$(printf "%q " "$@")"

    That will escape spaces within the quotes found in $@.

    But I'm not sure it will work well for something like: tryagain wget www.site.com/filexyz.ext -O "file name with spaces.ext"
    Posted 08-18-2014 at 05:56 PM by the dsc the dsc is offline
  11. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    Duh! I feel so stupid now. "$1" is the only thing that needs to be checked to figure out if it's a number, there's absolutely no need to do something more complex with the entire "$@", along the lines of checking if "grep ^[[:digit:]]" is positive.
    Posted 08-18-2014 at 02:15 PM by the dsc the dsc is offline
  12. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    You're absolutely right, I figured by using quotes around $@ that it would be fine, but isn't necessarily the case. Admittedly, my testing apparently was not diverse enough.

    It does seem I got lazy with the number checking.

    Thanks for the input.
    Posted 08-14-2014 at 07:27 AM by goumba goumba is offline
  13. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    Quote:
    I will admit I am no shell guru,
    Neither am I, and I'm always wary of those who claim they are!


    As for critique, your script was pretty good, but I'll offer two small things that caught my attention:

    1) Your case statement will incorrectly consider a string such as "7_is_a_prime" as a number.

    2) By using command="$@" and then later $command on its own to execute the command, you're negating the special word splitting that happens when $@ is used within quotes, so you would have been better not to use the intermediate and have used "$@" directly to execute the command.

    Try running your script like this and you'll see the impact it'll make:
    ./goumbas_script 2 ls -l "/tmp/file with spaces"

    BTW, because I used su -c "$@" in my script (an attempt to support compound commands), mine also has issues around word-splitting that need to be addressed with escapes/quoting on the command line, and as such was probably a mistake.
    Posted 08-14-2014 at 06:40 AM by GazL GazL is offline
    Updated 08-14-2014 at 06:53 AM by GazL
  14. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    Awesome man.

    I will admit I am no shell guru, I know probably enough just to get done what I want to get done, and certainly room for improvement.

    As far as infinitely trying, I had considered it, but I tried to keep along the functionality of the original post.

    Of course, there's only one way to do it, post a piece of work and get critiques and see improvements.

    Thanks.
    Posted 08-13-2014 at 08:00 PM by goumba goumba is offline
  15. Old Comment

    [bash] Continue to attempt running a command until it succeeds, or a specified number of tries.

    I read that same blog entry and had a go myself a few days ago. Was waiting for the author to respond to your comment before joining the discussion, but he didn't. Anyway, here's what I came up with, which is a similar approach to yours but slightly different
    Code:
    #!/bin/sh
    #
    # Repeatedly try to run a command until successful outcome,
    # or a max of 'n' attempts have been made.
    #
    # Usage:  tryagain [n] "<command> [arg1] ..." 
    
    isnum()
    {
      case "$1" in
        ''|*[!0-9]*)    return 1 ;;
        *)              return 0 ;;
      esac
    }
    
    runcommand()
    {
      sh -c "$@"
      rc=$?
      return $rc
    }
    
    
    if isnum "$1"; then
      n="$1"
      shift
    else 
      n=0
    fi
    
    until runcommand "$@"
    do
      [ $n -eq 1 ] && echo "Gave up trying!" >&2 && break
      [ $n -ne 0 ] && n=$(( $n - 1 ))
    done
    
    exit $rc
    n=0 means try forever in my implementation, which is different to yours.

    Putting the command to run at the bottom of the body of the until loop like you did means that unlike mine, you didn't need the function to capture the return code - I should have thought of that - but then my approach meant I didn't need to call /bin/false before entering the loop.

    Interesting to see a different approach. Thanks for posting.
    Posted 08-13-2014 at 03:51 PM by GazL GazL is offline
    Updated 08-13-2014 at 04:13 PM by GazL (Don't know what happened there, got corrupted while posting :doh:)

  



All times are GMT -5. The time now is 05:31 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration