Thanks! You guys rock. :guitar:
Type: Posts; User: sha1sum; Keyword(s):
Thanks! You guys rock. :guitar:
One quick follow-up question:
Is there a difference between ${1-.} and ${1:-.} ?
Or in general between
${var:-value}
and
I get it. Thanks!
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-.}
.
...
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...
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...
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...
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...
ROFL! Never thought that regular expressions could get so... Freudian. LOL
steeldriver you are awesome.
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...
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...
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...
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
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.
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...
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.
Gedit sometimes respons very slow (think 8 seconds), and it also slows down other programs.
This problem has been reported before, ( for example here:...
What's that text editor he is using? The one with the black background and the nice colored syntax highlighting?
Nice one! Much shorter than my awk counterpart. Good find sir.
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...
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
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...
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...
Thanks! Good explanation.