由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - 菜鸟2问题-about shell programming
相关主题
Help! shell programming求教,学shell program
shell programming问题:如何同时run多个作业"#! /bin/csh" != "#!/bin/csh" ??????
[急!] Shell Programming求救Shell Script Question
[转载] How to convert jpg or gif file to eps file?如何在perl中运行c-shell file?
A Question on Shell (ksh) programming新手求助shell script
[转载] shell programming and awk questionslogin shell and normal shell?
菜鸟问题-about shell programminghow to change login shell?
Is this shell programming right?recommend a network programming book
相关话题的讨论汇总
话题: file话题: files话题: line话题: shell
进入Unix版参与讨论
1 (共1页)
a**********t
发帖数: 4263
1
How to use script to merge a series of files to one big file while adding a
new line at the beginning of each file as a tag to index those files in this
big file later?
Bow. :)
t****t
发帖数: 147
2
for file in your-files;do
echo $file >>new.file
cat $file >>new.file
done

【在 a**********t 的大作中提到】
: How to use script to merge a series of files to one big file while adding a
: new line at the beginning of each file as a tag to index those files in this
: big file later?
: Bow. :)

a**********t
发帖数: 4263
3
I know this part, but I don't know how to add line to files when inserting to
a new file. Thanks anyway.

a
this

【在 t****t 的大作中提到】
: for file in your-files;do
: echo $file >>new.file
: cat $file >>new.file
: done

t****t
发帖数: 147
4
change the second line to
echo your-tag-information >>new.file
What's the difference since they are in a single file after mergence?

【在 a**********t 的大作中提到】
: I know this part, but I don't know how to add line to files when inserting to
: a new file. Thanks anyway.
:
: a
: this

1 (共1页)
进入Unix版参与讨论
相关主题
recommend a network programming bookA Question on Shell (ksh) programming
Job Opportunity[转载] shell programming and awk questions
[转载] Daxiamen, Please look at what's worng here?Thx.菜鸟问题-about shell programming
[转载] how to run remote SunOS graphic program from linux clinet ?Is this shell programming right?
Help! shell programming求教,学shell program
shell programming问题:如何同时run多个作业"#! /bin/csh" != "#!/bin/csh" ??????
[急!] Shell Programming求救Shell Script Question
[转载] How to convert jpg or gif file to eps file?如何在perl中运行c-shell file?
相关话题的讨论汇总
话题: file话题: files话题: line话题: shell