Search Results

Search: Posts Made By: jossojjos
11,443
Posted By jossojjos
Yes, of course, there are other ways to do this,...
Yes, of course, there are other ways to do this, like with pdftk :

pdftk cinq_nostop.pdf burst output cinq_nostop%02d.pdf

Strangely, but luckily, it also works when I ask ghostscript to create...
11,443
Posted By jossojjos
Gs to split a pdf into multiple pages
Hello,

Some googling and checking the man pages told me it should be possible to split a pdf (or ps) file into individual pages :


man gs

You might want to print each page separately. ...
2,629
Posted By jossojjos
No I don't, because answering "n" to the question...
No I don't, because answering "n" to the question immediately expands to "pubmed_result". If one could simply press TAB to get this completion ...
2,629
Posted By jossojjos
configure bash completion for multiple possibilities
Hello,

Bash completion is great, but there are some features I'd like to change. One thing is the behaviour when there are lots of very similar possibilities.

E.g., my directory contains 133...
3,996
Posted By jossojjos
Great, thanks ! It would definitely have taken...
Great, thanks !
It would definitely have taken a lot of time before I would have figured out that one can use awk this way ...
3,996
Posted By jossojjos
sed to conditionally delete multiple lines
Hello

I'd like to remove any line in an output file that is preceded by one or more warning messages (each warning is on a separate line).

Example :
WARNING: Estimation of lower confidence...
Forum: Programming 09-28-2010
3,713
Posted By jossojjos
the "printf("%d\n",k)" part was my addition ......
the "printf("%d\n",k)" part was my addition ... and indeed, I have no idea of how 32 or 64 bit architectures change that.

But anyway, k was declared as int, so the author of the program should...
Forum: Programming 09-28-2010
3,713
Posted By jossojjos
Thanks for pointing that out, kermit ! I'll...
Thanks for pointing that out, kermit !
I'll keep that in mind for the next time I analyze large datasets.

jos
Forum: Programming 09-28-2010
3,713
Posted By jossojjos
[jos@faba ~]$ ulimit -m unlimited But...
[jos@faba ~]$ ulimit -m
unlimited

But you're right, the program is trying to do something ridiculous :


k = com.npatt*com.ncatG*sizeof(double);
if((com.fhK=(double*)realloc(com.fhK,k))...
Forum: Programming 09-28-2010
3,713
Posted By jossojjos
realloc fails in C : what next ?
Hi all

I'm trying to use someone else's software, which has a realloc that fails in it. This is probably due to memory limitations, as it only happens when I use this software on huge datasets.
...
1,662
Posted By jossojjos
Yes, I know BioPerl exists, I even installed it...
Yes, I know BioPerl exists, I even installed it once.

For the moment, I hardly know perl, and simple tasks like pattern matching, changing file formats, etc are things one can do with awk, sed....
1,662
Posted By jossojjos
Thanks folks ! Actually, counting is just...
Thanks folks !

Actually, counting is just one of the things I'd like to do frequently ; replacing is another.

I can see quite easily how I could do this using the "fold" command (thanks for...
1,662
Posted By jossojjos
replacement and "reading frames"
Hi,

I'm working with DNA sequences, which as you might know are composed of "codons", which are the "words" if you like, and all codons are 3 letters long. So something I frequently need in my...
13,222
Posted By jossojjos
Merci beaucoup Jean-Pierre ! My gawk-guide...
Merci beaucoup Jean-Pierre !

My gawk-guide wasn't specific enough ... it suggested "0x" instead of "\x", but I guess that's only for hexadecimal to decimal conversions, not for manipulating ascii....
13,222
Posted By jossojjos
hexadecimal replacing with awk ?
Hi there !

I have text files with some nonsense characters in it, so different text editors put different nonsense symbols, and, worse, the application that should be able to read these files...
2,472
Posted By jossojjos
Almost !! Unfortunately, the files can be...
Almost !!

Unfortunately, the files can be much more complex : ...
2,472
Posted By jossojjos
Floating point to integer in variable length lines
Hi !

I'm looking for a way to transform certain floating point numbers in a one-line, variable length file to integers.

I can do this in a crude way with sed :
sed -e...
2,492
Posted By jossojjos
Great ! It works, and it's (not...
Great !

It works, and it's (not surprisingly) much faster than my bc-based solution.
I didn't know that awk could do floating-point arithmetic ... I'm going to learn how to use it right away !
...
2,492
Posted By jossojjos
Read lines with different lengths in while loop
Hi there !

I need to treat files with variable line length, and process the tab-delimited words of each line. The tools I know are some basic bash scripting and sed ... I haven't got to python or...
5,844
Posted By jossojjos
No, I don't, only LC_ALL is not sufficient ......
No, I don't, only LC_ALL is not sufficient ... struggled with that yesterday :)

So this seems to work :
alias csort="LC_ALL=C LC_COLLATE=C LC_CTYPE=C sort"I'm not sure why I should create a...
5,844
Posted By jossojjos
Interesting possibility. Can one set both...
Interesting possibility.
Can one set both LC_COLLATE and LC_ALL this way ?

LC_COLLATE="C" LC_ALL="C" sort ...
??

I found that only setting one of them still leeds to unpredictable sort...
5,844
Posted By jossojjos
shell: reconcile language and sort behaviour
Hi

Don't know if this is a dummy question, but let's give it a try.

I yesterday had a problem with undefined behaviour in the sort shell command (I'm using bash), leading to different sort...
10,617
Posted By jossojjos
Yes, that one does the job. I appreciate the...
Yes, that one does the job.

I appreciate the awk and perl suggestions of both of you ... they seem more concise than sed, so I'll try get familiar with them soon !
10,617
Posted By jossojjos
Thanks tyler_durden ! Of course, the...
Thanks tyler_durden !

Of course, the solution is two sed commands, which gets rid of a superfluous newline as well ... I told you I was new :-)

This leaves me with the question why [\t ] seems...
10,617
Posted By jossojjos
sed : replace space and end-of-line
Hi !

I'm rather new with sed ... learned a lot already by googling etc ...

The following script should replace all spaces and ends-of-lines with "something (see below).

#!/bin/bash

i=0...
Showing results 1 to 25 of 25

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