Search Results

Search: Posts Made By: Abhishek Ghose
31,985
Posted By Abhishek Ghose
Excel recognizes html tables - so if u can create...
Excel recognizes html tables - so if u can create a table from ur text/csv and save it as a .xls file, ure done...
3,464
Posted By Abhishek Ghose
$echo "01234567"|awk ...
$echo "01234567"|awk 'BEGIN{FS=null}{if(length==8 && $1!='0') print"Valid"}'
$echo "91234567"|awk 'BEGIN{FS=null}{if(length==8 && $1!='0') print"Valid"}'
Valid
Forum: Linux 10-30-2007
5,563
Posted By Abhishek Ghose
GPM mouse driver
Hi,

I am planning to tweak the exising GPM mouse driver for Linux. Can someone please tell me whether there is a good tutorial on it available?

Abhishek
2,308
Posted By Abhishek Ghose
I could, but...
I could. But then
(1) I need to modify the regexp I am now using to catch one such occurence (it catches 2 occurences now). For every loop I need to chop off the part of the string I have already...
2,308
Posted By Abhishek Ghose
metapattern extraction in PERL
Hi,

I want to extract some part of a pattern that matches my requirement in a string with PERL. A case in point is a string like:
$eqtst="abh nmae res = 10 s abh nmae req = 10 s";
from which I...
5,092
Posted By Abhishek Ghose
risk of overflow?
First of all, thanks for the response.

The order of my matrix is curently 2000 X 1000....but it might increase over time. Is there a possibility of memory overflow? This is one reason why I didnt...
5,092
Posted By Abhishek Ghose
processing matrix column wise
I have a m X n matrix written out to file, say like this:

1,2,3,4,5,6
2,6,3,10,34,67
1,45,6,7,8,8

I want to calculate the column averages in the MINIMUM amount of code or processing possible....
34,188
Posted By Abhishek Ghose
Oneliner
Here's an oneliner:

awk -v x=$a 'END{if(x==x+0) print "integer"}' /dev/null



In this example , a is shell variable.
If a=10, then the output of above is "integer"
If a="10abhishek", then...
2,857
Posted By Abhishek Ghose
Sorry...the corrected code is (missed the...
Sorry...the corrected code is (missed the conditional in the for loop):
awk 'BEGIN{FS=":"}{str=""; for(j=1;j<=NF;++j) if(j!=4) str=sprintf("%s%s",str,$j)}...
2,857
Posted By Abhishek Ghose
Tweaked for my system
Hi,

I made small change to the code posted by Ygor...and that will apply to solution by Aigles too (remember, my problem is reassigning $4 doesnt modify $0). Heres the changed code:

awk...
2,857
Posted By Abhishek Ghose
error
there is a slight problem i am encountering.......

reassigning $4, does not reassign $0. So both of the above methods are failing....any cures?
2,857
Posted By Abhishek Ghose
You are a man of few words :D ! Amazing! My...
You are a man of few words :D ! Amazing!
My unix machine is down, and it will be a while before I can try this out. But now that I have seen it, I can tweak it, if I do run into any errors.
...
17,129
Posted By Abhishek Ghose
Hi, I had a similar requirement sometime...
Hi,

I had a similar requirement sometime back. Check up the 'join' command in UNIX. The idea is to join (join as in a table-join in relational databases) the files using the first column and...
2,857
Posted By Abhishek Ghose
sorting/arrangement problem
Hi,
I have the following 'sorting' problem.
Given the input file:


a:b:c:12:x:k
s:m:d:8:z:m
a:b:c:1:x:k
p:q:r:23:y:m
a:b:c:3:x:k
p:q:r:1:y:m

the output I expect is:

a:b:c:1:x:k...
30,409
Posted By Abhishek Ghose
for future reference
Hi,
This thread was started when I found an error that I wrongly attributed to buffer overrun in PERL. I found the bug recently, and thought would mention it for future reference. The progressive...
Forum: Debian 06-19-2006
4,117
Posted By Abhishek Ghose
Thanks
Thanks cbkihong! I will see what I can do with your advice. I will post a solution here if I find anything worthwhile, within this week (I intend to upgrade to FC5 by next week anyway)
Forum: Debian 06-19-2006
4,117
Posted By Abhishek Ghose
No sound in FC3 on Intel D915GAVL
I am unable to get any sound in my Linux installation, which is Fedora Core 3 on a Intel D915GAVL mobo. I tried to look for similar problems on the net :( but most have their solutions in modifying...
30,409
Posted By Abhishek Ghose
thanks
Actually I rewrote the parts where I am assigning the contents of a file to an array ( now processing the contents with a while (<FILEHANDLE>) , but the error still occurs ), but I sure missed the...
30,409
Posted By Abhishek Ghose
sample code
open (INFILE,"file1");
my @all_PL=<INFILE>;

close INFILE;

open (INFILE,"file2");
my @all_PL_additional_details=<INFILE>;
close INFILE;

my...
30,409
Posted By Abhishek Ghose
Out of memory in PERL
I dont know whether this is a common error but it seems my PERL program is running out of buffer memory. Inside a loop I am processing an array (reading elements and displaying in it--note: for...
2,083
Posted By Abhishek Ghose
Number of posts counted wrong
I am not sure if this is the right place to post this. Heres my problem: When I posted yesterday I think I saw the number of posts made by me as above 60. Today morning when I posted, it showed my...
1,896
Posted By Abhishek Ghose
I am providing a possible solution thats three...
I am providing a possible solution thats three lines long. But if you explore the 'join' command in unix, I am sure you would work out shorter versions:

Let your first file be a.txt, and your...
3,195
Posted By Abhishek Ghose
Heres to your "^M" error: ...
Heres to your "^M" error:

https://www.unix.com/showthread.php?t=25936
16,021
Posted By Abhishek Ghose
"." runs the script in current shell, as you...
"." runs the script in current shell, as you said. The reason for doing this is we want B.sh to recognise the variable "var"(which can only be recognised in the shell that it was defined in)

If...
1,649
Posted By Abhishek Ghose
I am not very clear about the requirement (and...
I am not very clear about the requirement (and not good at sort too). But see if this helps:
$ awk -F" C" '{print $2"."$0}' sortfile|sed 's/DBSU/\./'|sort -n -t '.' -k +1 +
2 -3 +3 -4 +4 -5 +5|cut...
Showing results 1 to 25 of 81

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