• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unix Ksh split command

 
yuga devi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to unix.

I have the following code to grep the word "System" from my Test.jav and split the output to multiple files of 2 lines each.
My code is :

grep 'System' Test.java | split -l 2

which splits correctly and fill the output in the files from the split command xaa, xab,xac...etc.

I want to have my own name in the files like test1,test2,test3 etc.

Please help

--Yug


 
fred rosenberger
lowercase baba
Bartender
Posts: 12186
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
csplit might be a better one to use... check its man page.
 
yuga devi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic