This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unix Ksh split command  RSS feed

 
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: 12441
42
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
Boost this thread!