由买买提看人间百态

topics

全部话题 - 话题: file1
首页 上页 1 2 3 4 (共4页)
p******r
发帖数: 1127
1
好像不对吧。chmod是基于group的,而非root用户不能随便添加group.
就不能用chmod这么做。
例如,三个分属于不同组的用户user0,user1和user2. 文件所有者user0
希望跟user1,2分别共享file1和file2。普通用户应该怎么操作?
y********o
发帖数: 2565
2
This command
diff -y file1 file2
displays each line in both files, same or different.
Is there any way to suppress those lines that are the same? In other words,
can we have diff display only those lines that are different?
g***y
发帖数: 11
3
来自主题: Unix版 - question about appending file
I know it is easy to append to end of file, just cat file1 file2>file3.
Actually, I want to append one file into another file in given position (in
bytes). How can I do it?
Thanks.
c**t
发帖数: 2744
4
来自主题: Unix版 - question about appending file
man split

I know it is easy to append to end of file, just cat file1 file2>file3.
Actually, I want to append one file into another file in given position (in
bytes). How can I do it?
Thanks.
f*******n
发帖数: 4
5
来自主题: Unix版 - shell script for column operation
Thanks coconut;
I find "join file1 file2" works fine too.
w**a
发帖数: 1024
6
来自主题: Unix版 - shell script for column operation
paste file1 file2 | awk '{print $1,$2,$4}' > output.dat
x****e
发帖数: 19
7
来自主题: Unix版 - 请教一个文件处理的问题
有什么简单得unix命令能做这个事情啊:
如果我有两个文件
file1是这样的
17408 rs17685809 20 - A G YES reverse
56328 rs1954267 20 + A C YES same
57272 rs6038037 20 - C G YES reverse
82476 rs6055084 20 + C T YES same
86004 rs6055356 20 + C G YES same
。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。。。。。
file2 是这样的:
17408 rs17685809 SNP_A-2163138 T
57272 rs6038037 SNP_A-2255741 G
82476 rs6055084 SNP_A-2168395 T
85933 rs1434790 SNP_A-2188235 C
86004 rs6055356 SNP_A-4193827 G
...............................
。。。。。。。。。。。。。。
这两个文件的各个行都是已经按照第一个列排序过的
现在我
f******g
发帖数: 13917
8
来自主题: Unix版 - 请教一个文件处理的问题
Here you go, very easy one:
make a file name bbs.awk:
NR==FNR{_[$1]; next} $1 in _{print $0}
Then run it as:
awk -f bbs.awk file1 file2
Let me know if you have any questions.
i********e
发帖数: 16
9

Use copy file1+file2+file3+... outputfile
R*****g
发帖数: 72
10
type file1 >> file2
a********h
发帖数: 245
11
来自主题: Biology版 - 求教:Deep sequencing的data convert
我觉得你这个像是tag count file (参考 GBS pipeline)。
自己用 linux shell commands will do that (假设你的文件是space delimit):
cat input.txt | nl | gawk -F' ' '{print ">"$1"_"$3"\n"$2}'
>1_2
ACAAACGACTCTCGGCAACGGTTGT
>2_1
ATATGAAGACAAGTAGTGCAGCTCGGAGACGGG
>3_1
ATAATAGAGGTTTTGCAAAACAAT
sequence ID will be unique if you only have one file and also include read
number information. For multiple files, just do: cat file1 file2 file2 | nl
| gawk -F' ' '{print ">"$1"_"$3"\n"$2}'
m*******s
发帖数: 22
12
Hello everyone,
I have some data files which were originally written with a big_endian
machine.
Now, I try to use a fortran routine to read them with the compiler of
gfortran
built in a little_endian linux system. The input line is as follows:
open(8,file='file1' // cdat,
. form='unformatted',convert='big_endian',
. status='old',access='direct',recl=im*jm*4)
Where cdat is a string, say 198101.
When I compile the routine with gfortran, the system tip is: syntax error,
convert='big_endian'. If I r
p******h
发帖数: 1783
13

file1=['....' '.xls']
m*******s
发帖数: 22
14
Hello everyone,
I have some data files which were originally written with a big_endian
machine.
Now, I try to use a fortran routine to read them with the compiler of
gfortran
built in a little_endian linux system. The input line is as follows:
open(8,file='file1' // cdat,
. form='unformatted',convert='big_endian',
. status='old',access='direct',recl=im*jm*4)
Where cdat is a string, say 198101.
When I compile the routine with gfortran, the system tip is: syntax error,
convert='big_endian'. If I r
w********5
发帖数: 72
15
data file;
input num;
cards;
1234
123
567890
;
run;
data file1;
set file;
num_new=int(num/10);
run;
d******9
发帖数: 404
16
来自主题: Statistics版 - 刚才的sas programmer面试问题
This is a special case: all the dataset names are arranged in order, like
File1, File2, File3.....File10000.
What if they are not...?
h********o
发帖数: 103
17
来自主题: Statistics版 - 问个sas问题(包子)
Try this:
====================================
PROC SQL;
CREATE TABLE FINAL AS
SELECT A.ID,
A.EVENT_DATE,
B.ADMISSION_DATE
FROM FILE1 AS A LEFT JOIN FILE2 AS B
ON A.ID = B.ID AND A.EVENT_DATE >= B.ADMISSION_DATE
ORDER BY ID, EVENT_DATE, ADMISSION_DATE DESC;
QUIT;
PROC SORT DATA = FINAL NODUPKEY;
BY ID EVENT_DATE;
RUN;
s******r
发帖数: 1524
18
来自主题: Statistics版 - 问个sas问题(包子)
You can do with sql in one step, why use sort.
PROC SQL;
CREATE TABLE FINAL AS
SELECT A.ID,
A.EVENT_DATE format=mmddyy8.,
max(B.ADMISSION_DATE) format=mmddyy8. as max_admiss
FROM FILE1 AS A LEFT JOIN FILE2 AS B
ON A.ID = B.ID AND A.EVENT_DATE >= B.ADMISSION_DATE
group by a.id,a.event_date
ORDER BY ID, EVENT_DATE;
QUIT;
h********o
发帖数: 103
19
来自主题: Statistics版 - 问个sas问题(包子)
PROC SQL;
CREATE TABLE FINAL AS
SELECT A.ID,
A.EVENT_DATE FORMAT = MMDDYY10.,
CASE
WHEN MAX(B.ADMISSION_DATE) THEN MAX(B.ADMISSION_DATE)
END AS ADMISSION_DATE FORMAT = MMDDYY10.
FROM FILE1 AS A LEFT JOIN FILE2 AS B
ON A.ID = B.ID AND A.EVENT_DATE >= B.ADMISSION_DATE
GROUP BY A.ID, A.EVENT_DATE
ORDER BY ID, EVENT_DATE;
QUIT;
a********a
发帖数: 346
20
来自主题: Statistics版 - SAS Help
It is easy. Try
Proc sql;
create table file3 as
select a.id, a.name
from file2 as a
where a.id in (select id from file1);
quit;
W*****r
发帖数: 193
21
用各个csv的id合并起来
简单的的我知道怎么做
比如
proc import datafile="D:file1.csv"
out=new1 dbms=csv replace; getnames=yes;
run;
proc print data=new1;
run;
proc import datafile="D:file2.csv"
out=new2 dbms=csv replace; getnames=yes;
run;
proc print data=new2;
run;
data dn;
merge new1 new2;
by id;
run;
文件“dn”含new1 和 new2的所有variables, 使用公用的id
问题是,如果csv files很多怎么办?比如100+?
可不可以用proc sql + Macro做出来?
怎么做?
多谢。
d*******y
发帖数: 349
22
来自主题: DataSciences版 - 如何合并两个数据文件 (转载)
我想起来了。要用-e option必须和 -o option一起用。-o 是unix如何print output。
但是你有几万列的话,这个方法不适用。
0 是指 你的key
1.1 是file1的第一列
2.1 是file2的第一列。
你这个几万列的数据必须用迂回的办法。
首页 上页 1 2 3 4 (共4页)