Search Results

Search: Posts Made By: ni2
Forum: What is on Your Mind? 03-05-2017
3,602
Posted By bakunin
A few observations about programming habits and...
A few observations about programming habits and programming in general:

I think the real difference between naive and non-naive (clever) programming is not so much to make (or make not) use of a...
Forum: What is on Your Mind? 09-03-2015
2,441
Posted By Corona688
I have spent far more time fighting javascript...
I have spent far more time fighting javascript than using it. It forces you into a very rigid interactive browser based path, as well.

If you ever need to automate anything, debug anything -- if...
1,073
Posted By Akshay Hegde
Please use search option, many posts are repeated...
Please use search option, many posts are repeated on forum

https://www.unix.com/302921239-post3.html
1,906
Posted By Don Cragun
A single awk command could do this more...
A single awk command could do this more efficiently, but I find the logic easier to express with a couple of sort commands, one uniq command, and a read loop in the shell...
#!/bin/ksh
last_gene=""...
1,906
Posted By Scrutinizer
Hi, another one to get you started: The...
Hi, another one to get you started:

The code needs to modified still to print the highest number of connections rather than only the number of connections...

awk's associative arrays are nice...
14,979
Posted By RudiC
Trysed -E 's/(...)./\1*/; :A s/ [^*]/**/; tA'...
Trysed -E 's/(...)./\1*/; :A s/
[^*]/**/; tA' file2
aba*****
cdc*******
efe******

For legibility I've used the -E (= -r) option so the parentheses etc. don't need to be escaped.
2,781
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

awk -F, # run awk and set field separator char
' # quote the entire script
NR==FNR...
Forum: What is on Your Mind? 11-26-2014
1,968
Posted By rbatte1
I'm happy to recycle any discards. I currently...
I'm happy to recycle any discards. I currently drive a Nokia 3410 (http://upload.wikimedia.org/wikipedia/commons/a/ab/Nokia3410.png)

It's a phone. It can text and it works. Loads of folk here...
Forum: What is on Your Mind? 12-09-2014
6,819
Posted By Neo
Very good points. In response, I will do the...
Very good points. In response, I will do the following:


I'll move the Thanks button to the far left where it stands alone to make it more noticeable. (DONE)

I'll add a bottom guideline...
Forum: What is on Your Mind? 12-01-2014
6,819
Posted By figaro
There is a related thread in this subforum: ...
There is a related thread in this subforum:
https://www.unix.com/what-is-on-your-mind-/141344-how-can-we-increase-size-our-community.html
Whatever solution is put in place, I think it should be...
1,137
Posted By Michael Stora
Generating summary data (use awk?)
I have a data file similar to this (but many millions of lines long). You can assume that it is totally unsorted but has no duplicate rows.

Date ,Tool_Type ,Tool_ID ,Time_Used...
1,552
Posted By dbiggied
Weird problem with join command
I have a weird issue going on with the join command...
I have two files I am trying to join...here is a line from each file with the important parts marked in red:

file1:...
1,552
Posted By joeyg
One thing that comes to mind is the possibility...
One thing that comes to mind is the possibility for embedded <CR> and/or <LF> characters.
Can you create simple one-line files (manually typed, or carefully cut/paste) and verify that this is not...
Forum: War Stories 10-19-2013
4,945
Posted By Akshay Hegde
Useful one should be aware of
Today I was reading some posts/news in efytimes.com, in that I found one post useful post, and felt it's good to post here so that if any more such commands are there then we can discuss.

Here...
1,137
Posted By Don Cragun
Your script looks like at least two different...
Your script looks like at least two different people have been working on it.

Your specification does not say what should happen if both bad STATUS codes are found for a single ID and INDEX. The...
5,894
Posted By Don Cragun
Does this help? #!/bin/ksh awk ' NR > 1 {#...
Does this help?
#!/bin/ksh
awk '
NR > 1 {# For all lines except line 1 (which contains headers; not data), loop
# through the 2nd field and increment the number of times the six
...
Forum: What is on Your Mind? 02-16-2014
1,030
Posted By Perderabo
The ISS has upgraded to Linux
Remember this thread (https://www.unix.com/what-your-mind/161108-unix-linux-used-space-exploration.html) from a few years ago? What a difference just a few years make!

Those laptops I mentioned...
Forum: What is on Your Mind? 11-15-2013
1,570
Posted By vbe
Believing its difficult makes it difficult! ...
Believing its difficult makes it difficult!
There is no such thing like code learning, learning algorithms yes...
You learn progamming, progamming languages...
Then you write your own or correct...
Forum: What is on Your Mind? 11-16-2013
4,739
Posted By Neo
Org Charts
Funny org charts for Apple, Google, Microsoft, Oracle, Amazon and Facebook.

https://www.unix.com/picture.php?albumid=112&pictureid=613
2,887
Posted By vgersh99
pesky awk-s - don't flush output unless you...
pesky awk-s - don't flush output unless you explicitly close the pipped cmd
awk 'NR % 2 {print;next}; {print | "rev";close("rev")}' myfile

# for every EVEN line
!(FNR%2) {
# initialize a...
1,313
Posted By Yoda
Bash version >= 4 supports case modification...
Bash version >= 4 supports case modification (http://wiki.bash-hackers.org/syntax/pe#case_modification) operations:

In lower versions you can use tr instead. Here is an example:
NAME="FIRST LAST"...
6,521
Posted By bakunin
You asked a lot of questions in one and i can't...
You asked a lot of questions in one and i can't answer them all (a forum is simply not the right place to teach someone - a good book is better suited for that). I will try to give you some starting...
Forum: What is on Your Mind? 09-03-2013
1,954
Posted By figaro
What is your favorite TED talk?
The TED talk (Technology Entertainment Design) non-profit initiative started many years ago as a platform for sharing knowledge to a wide audience. Since 2006 the talks are available online under a...
45,804
Posted By briandanielz
I think this is interesting, and would be willing...
I think this is interesting, and would be willing to participate if it was about shell scripting. If you look at reddit.com/r/dailyprogrammer and take their model but limit it to bash / linux I...
45,804
Posted By Ygor
The Advanced Bash-Scripting Guide has some...
The Advanced Bash-Scripting Guide has some exercises (http://www.tldp.org/LDP/abs/html/exercises.html).
Showing results 1 to 25 of 62

 
All times are GMT -4. The time now is 06:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy