Computing.Net > Forums > Unix > sort command

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sort command

Reply to Message Icon

Name: wzupeveryone
Date: February 16, 2003 at 14:57:23 Pacific
OS: unix
CPU/Ram: p4 640
Comment:

i need some help with the sort command.

i want to make a one line command using redirection and pipes.i want to sort a file: file1 and file2 into file3 with the first 5 lines sorted.

please help



Sponsored Link
Ads by Google

Response Number 1
Name: WilliamRobertson
Date: February 16, 2003 at 15:52:16 Pacific
Reply:

Try:

sort file1 file2 | head -n5 > file3


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: sort command

Sort command problem www.computing.net/answers/unix/sort-command-problem/4043.html

sort data www.computing.net/answers/unix/sort-data/7134.html

URGENT! help with sorting in awk www.computing.net/answers/unix/urgent-help-with-sorting-in-awk/4442.html