Solved

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

Posted on 2013-01-11
1
411 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 84

Accepted Solution

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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
RoboCopy to Changing External Drives 2 51
Shell Script on AIX 7 112
aix unix tar error 3 73
awk file 6 78
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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.

856 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