Search Results

Search: Posts Made By: chen.xiao.po
1,442
Posted By chen.xiao.po
renumbering within a file
Hi All,

I have 100 files named - rep-0.txt, rep-2.txt...rep-99.txt.

They each contain information in the following format:
abc 1 qwe
asd 2 zxc
poi 3 lkj
pdh 4 ldf
hgf 5...
3,044
Posted By chen.xiao.po
sort files by numeric filename
dear all,

i have .dat files named as:
34.dat
2.dat
16.dat
107.dat

i would like to sort them by their filenames as:
2.dat
16.dat
34.dat
107.dat

i have tried numerous combinations of...
1,269
Posted By chen.xiao.po
Classify value to a range
Dear All,
I need to classify my data into sets or ranges based on values in the second column of a file as - low medium and high.

INPUT:

file1.dat
1.tmp 1.03
2.tmp 0.38
3.tmp 3.23
4.tmp...
4,422
Posted By chen.xiao.po
i scrapped the idea!
i scrapped the idea!
4,422
Posted By chen.xiao.po
Calculating weighted average
Dear all,

i have 200 values in a file. How can i calculate a weighted average and output into a new file avg.dat?
INPUT:
file1.dat
1.3453
2.434
2.345
.....

OUTPUT:
avg.dat
file1: 1.762...
7,921
Posted By chen.xiao.po
Sorry franklin, your suggestion works and the...
Sorry franklin,
your suggestion works and the format was recognised by the program!

Thanks all!!
Po
7,921
Posted By chen.xiao.po
its working perfectly itkamraj! however, the...
its working perfectly itkamraj! however, the program that is used to read the pdb file is space sensitive and the number of spaces between each column in the output file MUST be the same as that of...
7,921
Posted By chen.xiao.po
i do not have nawk installed on my linux. is...
i do not have nawk installed on my linux. is there an alternative to nawk? can i use awk instead?
7,921
Posted By chen.xiao.po
the above perl command was executed. the...
the above perl command was executed.

the format of the pdb was maintained, however, the output is identical to the original pdb input (file1.pdb). (i.e. the red values remained as it is and were...
7,921
Posted By chen.xiao.po
Thanks bartus11, It works but does not retain...
Thanks bartus11,
It works but does not retain the original format of the pdb file .
How can we do the same thing, without disturbing the format (pdb format) of the file1.pdb?
7,921
Posted By chen.xiao.po
replace a column with values from another file
Dear all,

I have a file1.pdb in pdb format and a dat file2 containing values, corresponding to the atoms in the pdb file. these values (file2.dat) need to be in the column instead of the 0.00...
1,904
Posted By chen.xiao.po
Thanks Bartus11 :b:
Thanks Bartus11
:b:
1,613
Posted By chen.xiao.po
sed 's/,FROM/FROM/g'
sed 's/,FROM/FROM/g'
1,904
Posted By chen.xiao.po
Count occurences of a numeric string falling in a range
Dear all,

I have numerous dat files (1.dat, 2.dat...) containing 500 numeric values each. I would like to count them, based on their range and obtain a histogram or a counter.


INPUT:
...
2,179
Posted By chen.xiao.po
I used the following script, in vain! Code: ...
I used the following script, in vain!

Code:

#!/bin/csh
set k = 1
while ($k = 250)

set i=0
set low = 0
set medium = 0
set high = 0
foreach line ("`cat $k.dat`")
set j = `printf $line`...
2,179
Posted By chen.xiao.po
histogram or counter
Dear all,

I have numerous dat files (a.dat, b.dat...) containing 500 numeric values each. I would like to count them, based on their range and obtain a histogram or a counter.


INPUT:

a.dat...
1,055
Posted By chen.xiao.po
thanks itkamaraj!! its working :)
thanks itkamaraj!!

its working :)
1,055
Posted By chen.xiao.po
Print entire columns into new file
Dear All,

I am having trouble obtaining the 3 outfiles (as shown below) from a single input file.

Could you please help??

INPUT:

filename

a b c
1 4 2
3 3 ...
2,191
Posted By chen.xiao.po
trouble executing a command in csh
Hi All!!

I am having trouble in executing the following command into a c-shell script.

mv "$file" "$(head -1 "$file")"

The funny thing is that the same command works perfectly from the...
844
Posted By chen.xiao.po
Since there are multiple input files, giving a...
Since there are multiple input files, giving a single input file does not serve the purpose
844
Posted By chen.xiao.po
search contents of a file and use it to name the file
Hi All!

I have text files containing data as follows:

file1 file2 file3 file4

abc pqr def ghi
76 43 34 3
43 34 3 23...
Showing results 1 to 21 of 21

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