Search Results

Search: Posts Made By: danieladna
1,394
Posted By danieladna
Calculating mean for samples 1-3 4-6 etc.
Hi.
I have a LOOONG list of samples but I am not sure how to write the loop/script to calculate the mean...
I normally use awk...
...................MEAN
Sample1 25.82 40.61333
Sample1 47.6 ...
1,844
Posted By danieladna
I tried ur perl command but it is not removing...
I tried ur perl command but it is not removing the 2nd underscore ... :confused:
1,844
Posted By danieladna
delete trailing whitespace from end of each line in column 1 only
Hi All.
How can I convert this:

ABC_1_1
ABC_1_2
ABC_1_3

into this:
ABC_1 1
ABC_1 2
ABC_1 3

I tried this command but it is not working:
awk '{sub(/[_]+$/,"\t", $1)}{print}'
...
1,358
Posted By danieladna
Thank you so much. It seems to be working...
Thank you so much.
It seems to be working though I don't really follow how the program is working.
Is it comparing e.g.
Line 2 to Line 1. If there is no overlap, it keeps both lines and then...
1,358
Posted By danieladna
Only the very last one!
Only the very last one!
1,358
Posted By danieladna
Cutting lines if conditions are met
Hi.
I am not sure how to solve this problem and if it is possible to do so with scripting. :wall:

Let's say I have this data:

A 12345 12360
A 12359 12380
A 12381 12390
A 12400 12450
A...
2,073
Posted By danieladna
I think I am starting to understand what you did:...
I think I am starting to understand what you did:
find ./ \!-name "*.jpg" -type f

Find in this directory all files that are not jpg files! Correct?
How would I make this statement for 2 files...
2,073
Posted By danieladna
file renaming with if else clause
Hi.
I am trying to rename some files with an if else clause.

So far I am doing it this way:

for file in *;
do mv $file `echo $file|sed 's/$/.txt/'`;
done

This make all my files have a...
4,144
Posted By danieladna
let me try to explain again what I am trying to...
let me try to explain again what I am trying to do.
I am creating one single file with its input lines coming from multiple file.
E.g.
file 1
aaa
file 2
bbb

these 2 files are joined into...
4,144
Posted By danieladna
I have tried that before but it doesn't work. I...
I have tried that before but it doesn't work.
I am getting following error message:
awk: syntax error at source line 1
context is
{print >>> 9_test. <<< txt FILENAME}
awk: illegal...
4,144
Posted By danieladna
create new column for filename
Hi,
I created a list with 2 columns.
Each line is from a different file. I am getting these with a loop in Perl. I would like to add a 3rd column with the name of the file that the line is coming...
53,369
Posted By danieladna
This doesn't seem to be working for me. I get...
This doesn't seem to be working for me.
I get the message that ln: target `pic1.jpg' is not a directory
Any clues?
53,369
Posted By danieladna
e.g. I have 50 files in the directory jpg1 ...
e.g.
I have 50 files in the directory jpg1

file1.jpg
file2.jpg
..
file50.jpg

I want to make symbolic links for all them to my current directory /jpg2

I tried in directory jpg2

$ln -s...
53,369
Posted By danieladna
can I create symbolic links for multiple files simultaneously
Does anybody know how to make symbolic links for multiple files simultaneously?
Often times I need make symbolic links for multiple files with some common pattern (just like "*.jpg"). Is there a...
1,284
Posted By danieladna
I was thinking of a table similar to the one in...
I was thinking of a table similar to the one in the xls spreadsheet...
Thanks again! :confused:
1,284
Posted By danieladna
What do I do if I have: 3315 E14 1 397...
What do I do if I have:
3315 E14 1
397 E14 2
321 E14 3
27 E14 4
7 E14 5
2 E14 6
2000 E9 3
3000 E9 4
500 E9 6

I do want to transform...
1,284
Posted By danieladna
conversion and transpositions of columns and rows
Hi,
I am wondering how to do this more efficiently than I am currently doing it:
I have these 3 columns
3315 E14 1
397 E14 2
321 E14 3
27 E14 4
7 E14 ...
7,670
Posted By danieladna
Thanks!
Thanks!
7,670
Posted By danieladna
For example: 0000000111111112222222 ...
For example:
0000000111111112222222
00111111111111111111
2222222444444401111111

The awk should only return the first line, not the last two lines.
7,670
Posted By danieladna
I am using a Mac OS X. Not working means that...
I am using a Mac OS X.
Not working means that I am not getting anything back from the command even though I know that I should. It looks like nothing matches the awk pattern, but I am positive that...
7,670
Posted By danieladna
/0000*1111*/ is nice but what if I want to match...
/0000*1111*/ is nice but what if I want to match 0 twenty times?
I am not going to type 000000000....

awk '$3 ~ /0{3,}1{3,}/' file is not working :(
7,670
Posted By danieladna
awk -repeated pattern match
Hi.
How can I write this differently:
awk '$3 ~ /0001/{print}'
Is there a way to write 0001 differently. I am looking for the pattern 01, with 3 or more 0 and 3 or more 1 in a pattern.
Thanks.
8,269
Posted By danieladna
I learned by using a tutorial like this one: UNIX...
I learned by using a tutorial like this one: UNIX / Linux Tutorial for Beginners (http://info.ee.surrey.ac.uk/Teaching/Unix/)
After you are trough with it you will feel more comfortable in Unix!...
1,635
Posted By danieladna
Obviously I have done that already but haven't...
Obviously I have done that already but haven't found one that I really like and would recommend to someone else.
1,635
Posted By danieladna
Do you know a really good awk tutorial?Cheat...
Do you know a really good awk tutorial?Cheat Sheet? or anything useful to work with by any chance?
Showing results 1 to 25 of 32

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