pavand
December 19, 2017, 1:54pm
1
Hi All!!
I have a large file containing millions of records. My purpose is to extract 8 characters immediately from the given file.
222222222|ZRF|2008.pdf|2008|01/29/2009|001|B|C|C
222222222|ZRF|2009.pdf|2009|01/29/2010|001|B|C|C
222222222|ZRF|2010.pdf|2010|01/29/2011|001|B|C|C
222222222|ZRF|2011.pdf|2011|01/29/2012|001|B|C|C
222222222|ZRF|2012.pdf|2012|01/29/2013|001|B|C|C
222222222|ZRF|2013.pdf|2013|01/29/2014|001|B|C|C
222222222|ZRF|2014.pdf|2014|01/29/2015|001|B|C|C
222222222|ZRF|2015.pdf|2015|01/29/2016|001|B|C|C
So, my OUTPUT would be as under :
222222222
222222222
222222222
222222222
and so on.....
Please Help with Backup Shell Script. Thanks in advance
---------- Post updated at 02:52 PM ---------- Previous update was at 02:44 PM ----------
This is not a homework. This is the one got an error
---------- Post updated at 02:54 PM ---------- Previous update was at 02:52 PM ----------
@Scott and @Rudic tryto understand this is not a homework.
Scott
December 19, 2017, 2:19pm
2
I've move this thread from "How to Post in the The UNIX and Linux Forums". Please stop posting technical questions in that forum.
Please post what you've tried so far, in code tags.
1 Like
RudiC
December 19, 2017, 3:25pm
3
As much as I'd like to believe you, that'd be difficult looking at your below quote . The problem is similar, and the sample data are identical.
Please explain in detail why and how this is NOT homework, like the company you work for, the project your work on, and / or the problem background or reasoning behind. Seriously, persuade us, don't try kidding us!
pavand:
I have a homework and I tried to work on this but unable to find the solution. Can someone help me how to resolve the issue.
I have a package file and it contains text file as prod.ame300_000001.101414145111.A.txt.
In the text file it contains pdf file (222222222|ZRF|2008.pdf|2008|01/29/2009|001|B|C|C)
.
.
.
pavand
December 19, 2017, 3:33pm
4
I am working for a company and right now am working on project. I am new to linux shell scripting
jgt
December 19, 2017, 9:11pm
5
read the man page for the cut comand paying attention to the field and delimiter options.
Hi pavand...
Before asking for help get you output requirements correct first.
You OUTPUT shows 4 lines of 9 characters, (ALL identical?), instead of 8 lines of 8 characters, (ALL identical?).
How can we possibly know which line of the first 8 OR 9 characters are needed when they all identical, or am I missing something?