is there a way of using less to open a file with no word wrap, ie with horizontal scrolling? Im sure there is but 'man less > grep "wrap"' doesnt seem to bring up anything. Apologies if this is the wrong forum!
Many thanks
Jim
cunning, I can turn the \s into \n...
But it still doesnt seem to be working, is it standard error instead of standard out? In which case how do I pipe standard error?
is there a way of splitting standard out/ standard error from a script that falls over, so far I've got:
% ./scratch.pl | split
if you imagine the error was like:
asdf asdf werqwer asdfasf asdasdf
I want a way to split this up by whitespace to become:
asdf
asdf
werqwer
asdfasf
asdasdf
I...
Is it possible to use SELECT DISTINCT to use distinct on certain columns, but not on others, for example
"SELECT DISTINCT columna, columnb, columnc FROM table" would bring back all the results where columna, columnb and columnc were not all the same, and if they were it would bring back only...
Hi guys,
I am currently writing a complicated script (perl) to do something I feel I could do with one SQL command:
I have a table -
EXP_NAME ID CHANGE
A AX 234.23
A AB -23.23
A AC 22.23
B AX -43.25
B...
Hi guys
I'm trying to work out if a table exists in my database, using an object which inherits from DBI.
my $TableExists = $dbh->fetchrow_array;
if ( $TableExists = "NO") { warn "No table";}
Now my question is...surely there is a way of combining the $dbh->fetchrow_arraty into the...
I am trying to do a switch statement which analyses multiple expression:
int main(){
char str1[] = "H";
char str2[] = "B";
switch ( * str1, * str2 ){
case 'H''B':
printf("%s","YUP");
break;
case 'B''B'...
I think u misunderstand me. I only want to replace AT with NN when AT is repeated 9 or more times(hence {9,})
ie in this string ATGCACAACAATATACGAATATATATATATATATATCGTATCGC
will become this
ATGCACAACAATATACGANNNNNNNNNNNNNNNNNNCGTATCGC
do u see the difference? I only want to replace repeat...
Hi I have a long string in which I want to substitute repeated AT regions with N, ie ATATATATATATATATATAT NNNNNNNNNNNNNNNNNNNN I am having a problem doing this i have tried with tr/// which seems to mask all AT no matter how many repeats there are, and also with the s/// which behaves oddly...
HAHA I got fed up so had a brief look at some mysql and found out i can just add now() mysql funtion and do away with trying to work out the date!!!!
cheers for ure help though, I've noted the sprintf vs printf though i expect thats prob quite basic stuff :$
ok its printing fine to screen now but for some reason it still wont go into the database which remains 0000-00-00
oh and also the date has become 1900-01-00 :S
my $dateImported=(sprintf "%d-%02d-%02d",$year+1900,$mon+1,$day); #COOL CODE, BUT NOT WORKING (SHOULD RETURN INTEGER NOT STRING...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.