Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script using the cut command 1

Status
Not open for further replies.

buckpasser

Technical User
Mar 10, 2005
24
US
Folks,

I have a large data file that I cut data out of using the following cut command line.

cut -f 1-3,6,7,11,12,28,33,43-45,62,64,97-101,210,211,217,224,286,316,326,346,556,616,846,1181 -d ',' filename.txt >> newfile.txt

Rather than retyping the command over and over again, I would like to use a script.

Thanks
 
Hi

[tt]alias[/tt] ? If you have [tt]bash[/tt] or [tt]ksh[/tt]. Maybe in other shells too.
Code:
alias mycut="cut -f 1-3,6,7,11,12,28,33,43-45,62,64,97-101,210,211,217,224,286,316,326,346,556,616,846,1181 -d ','"

mycut filename.txt >> newfile.txt

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top