Search Results

Search: Posts Made By: pilnet101
2,821
Posted By RudiC
Not necessarily too new nor fancy nor...
Not necessarily too new nor fancy nor inventive...
awk -vW=10 'function PR(){T=sprintf("%*.*d",W+i-1,i*2-1,0);gsub("0","*",T);print T};BEGIN{for(i=1;i<=W;i++)PR();for (i=W-1;i>0;i--)PR()}'

I...
2,821
Posted By Don Cragun
Yes, this is fun. ;) This isn't quite as...
Yes, this is fun. ;)

This isn't quite as compact as Scrutinizer's approach (and calculates each line as it goes instead of memorizing lines), but there are some fun games you can play with this...
2,821
Posted By Scrutinizer
Thanks pilnet101 :) . Basically it increases the...
Thanks pilnet101 :) . Basically it increases the line length by 2 every line and memorizes the line. Then at maximum length, the loop starts to decrement, rather than increment and only prints the...
1,683
Posted By Aia
$ printf "%s slots=%s\n" $HOST_LIST t70c7n133...
$ printf "%s slots=%s\n" $HOST_LIST
t70c7n133 slots=16
t70c7n134 slots=16
t70c7n135 slots=16
t70c7n136 slots=16
t70c7n137 slots=16
t70c7n138 slots=16
t70c7n140 slots=16
t70c7n141 slots=16
1,683
Posted By Don Cragun
With the above code, bash version: GNU bash,...
With the above code, bash version:
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
and ksh version:
Copyright (C) 2007 Free Software Foundation, Inc.
version sh (AT&T...
3,171
Posted By Don Cragun
There are two things to consider here: if...
There are two things to consider here:

if you only want to change one occurrence of something, use sub() instead of gsub(), and
the problem you're seeing isn't the ERE, the real problem is the...
847
Posted By RudiC
Try alsoawk 'OA != $1 {if (NR>1) printf...
Try alsoawk 'OA != $1 {if (NR>1) printf "%6.1f\n", CNT?SUM/CNT:EXC
OA=$1; printf "%s\t%s\t%s\t%s\t", $1, $2, $3, $4; SUM=0; CNT=0}
$5==EXC {next}...
Forum: What is on Your Mind? 06-12-2014
2,299
Posted By rbatte1
A few thoughts that might help you:- You might...
A few thoughts that might help you:-
You might need to work on your interfacing
Negotiating access is critical before attempting IO
Ensure you use the agreed port
Take virus protection...
Forum: What is on Your Mind? 06-07-2014
2,515
Posted By Akshay Hegde
I agree with corona688, rbatte1 and bakunin,...
I agree with corona688, rbatte1 and bakunin, coding is very simple basics things you need to improve / understand are :

1. Logical / control flow
2. Basic mathematics
3. Basic logic gates and...
Forum: What is on Your Mind? 06-07-2014
2,515
Posted By bakunin
Finally: be aware that "programming" isn't...
Finally: be aware that "programming" isn't "programming".

There is the highly scientific number crunching: you need a solid mathematical background to even understand the algorithms involved and...
Forum: What is on Your Mind? 06-05-2014
2,515
Posted By gandolf989
I prefer Advanced Tea Substitute, it tastes...
I prefer Advanced Tea Substitute, it tastes almost, but not quite, entirely unlike tea. ;-)

Programming is about problem solving, and programming well is about solving problems without repeating a...
Forum: What is on Your Mind? 06-05-2014
2,515
Posted By rbatte1
IT has put lots of clerks out of work by taking...
IT has put lots of clerks out of work by taking the boring repetitive processes they had are replacing them with machines that do far more far quicker. All the important work they would have done...
Forum: What is on Your Mind? 06-04-2014
2,515
Posted By Corona688
As I see it, what programming takes is...
As I see it, what programming takes is creativity, thoroughness, and the right kind of obsessive laziness... My programming journey truly began in high-school, when my biology teacher handed me an...
3,914
Posted By rbatte1
Dear pilnet101, I'd worry that your code...
Dear pilnet101,

I'd worry that your code will be extremely heavy processing when confronted with a large input file. You will spawn processes for every record. My way will not and should run...
Showing results 1 to 14 of 14

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