Search:

Type: Posts; User: sha1sum; Keyword(s):

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. [SOLVED] Re: [BASH] What does the variable ${1-.} contain?

    Thanks! You guys rock. :guitar:
  2. [SOLVED] Re: [BASH] What does the variable ${1-.} contain?

    One quick follow-up question:

    Is there a difference between ${1-.} and ${1:-.} ?

    Or in general between


    ${var:-value}
    and
  3. [SOLVED] Re: [BASH] What does the variable ${1-.} contain?

    I get it. Thanks!
  4. [SOLVED] [BASH] What does the variable ${1-.} contain?

    Dear forum members,

    I was reading through a bash script of one of my coworkers, and I see that he uses the variable ${1-.}. When I echo it in the ternimal, it simply returns

    $ echo ${1-.}
    .
    ...
  5. Replies
    15
    Views
    894

    [SOLVED] Re: awk regular expressions: \1

    Thanks for that excellent piece of additional information.

    I think you are right. The last two weeks I've been studying awk to learn all of it's functions. Partly for the fun and kicks of...
  6. Replies
    15
    Views
    894

    [SOLVED] Re: awk regular expressions: \1

    Hello guys. Thank you all for taking the time to answer my question. The conclusion I draw is that awk doesn't support backreferences (apart from the gensub function, which you can use to make a...
  7. Replies
    15
    Views
    894

    [SOLVED] awk regular expressions: \1

    Hello guys,

    With grep -E (or egrep), you can do something like this:


    grep -E '(.)(.)\2\1' target.txt

    This matches everything with the pattern abba.

    However, I found that it doesn't work...
  8. Replies
    10
    Views
    546

    [SOLVED] Re: Regular expression question

    I made the following awk script:



    # charcount: an awk script that filters based on the number of unique characters in a line

    BEGIN{ FS="" } # Make every individual...
  9. Replies
    10
    Views
    546

    [SOLVED] Re: Regular expression question

    ROFL! Never thought that regular expressions could get so... Freudian. LOL
  10. Replies
    10
    Views
    546

    [SOLVED] Re: Regular expression question

    steeldriver you are awesome.
  11. Replies
    10
    Views
    546

    [SOLVED] Re: Regular expression question

    lol it did for me too. The original example I wanted to write was: "I need a regular expression that matches book, but not boob". But then I realized; who in their right mind would prefer books over...
  12. Replies
    10
    Views
    546

    [SOLVED] Re: Regular expression question

    Okay, I´ve searched a lot on the internet and in various reference books, but I really couldn´t find a way to do this. Then I took a break, and ingested a copious amount of caffeine and sugar, and I...
  13. Replies
    10
    Views
    546

    [SOLVED] Regular expression question

    Hello guys, I need help with regular expressions.

    Quick recap: we know that with advanced regular expressions, you can put something in parenteses to save a part of a regular expression. For...
  14. Replies
    11
    Views
    666

    [SOLVED] Re: printing certain lines from a file

    Every time I find a new way to do it, I'm going to update this topic. I found that with awk you can also do it like this:

    awk 'NR==30,NR==35' file.txt
    So many possibilities :D
  15. Re: I disabled all plugins, but gedit is still slow

    Thanks for your sharing your experiences. I think I'm also going to update to Saucy (or Trusty when it comes out) one of these days.
  16. Re: I disabled all plugins, but gedit is still slow

    Thanks for your reply. I'm currently using 12.04 (precise) 32-bit and the GEdit Version 3.4.1 that comes with it by default. As long as I can't pinpoint the problem, I don't want to waste the...
  17. Re: I disabled all plugins, but gedit is still slow

    No, the issues also occur while just starting gedit without any file.

    I checked system monitor and I see a spike in CPU usage when opening gedit.
  18. I disabled all plugins, but gedit is still slow

    Gedit sometimes respons very slow (think 8 seconds), and it also slows down other programs.

    This problem has been reported before, ( for example here:...
  19. Re: One Time A Guy Gave A Homeless Man A Computer, And The Recipient Did Exactly What

    What's that text editor he is using? The one with the black background and the nice colored syntax highlighting?
  20. Replies
    2
    Views
    323

    Re: sed & awk emulation game

    Nice one! Much shorter than my awk counterpart. Good find sir.
  21. Replies
    2
    Views
    323

    sed & awk emulation game

    Hello guys/gals,

    Lately I've been studying programming a lot, and especially sed and awk. As a game to improve my skills, I often try to write small sed and awk commands that replicate bash...
  22. Replies
    11
    Views
    666

    [SOLVED] Re: printing certain lines from a file

    New update to my own topic :D Now I'm studying the use of AWK, and I discovered that in awk you can do it like this:



    awk '30<=NR && NR<=35' file.txt
  23. Re: Buying a new computer: things to pay attention to?

    Thank you for your replies. My current computer is working fine, and as long as it's like that I don't need a new one. However nothing man-made has eternal life so at some point it will have to be...
  24. Buying a new computer: things to pay attention to?

    Hello guys,

    I've bought this computer almost 5 years ago and it's still working. However I guess at some point I'll need a new computer. I'm not really looking for anything fancy, but I do want it...
  25. Replies
    2
    Views
    267

    [SOLVED] Re: awk loop question

    Thanks! Good explanation.
Results 1 to 25 of 117
Page 1 of 5 1 2 3 4