Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

print first 3 characters to a file  from each row from a file

Posted on 2013-01-11
1
Medium Priority
?
423 Views
Last Modified: 2013-01-11
I have a file with few rows of data (trailer.txt),  I could have more in future .I have to print first 3 characters from each row to a file (tralier.sorted.txt)
the input file and output file  of  how the data has to look are attached
trailer.txt
trailer-sorted.txt
0
Comment
Question by:uco
1 Comment
 
LVL 85

Accepted Solution

by:
ozo earned 2000 total points
ID: 38767329
cut -c 1-3 trailer.txt | sort
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question