Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2003 22:06:15 -0600
From:      "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz>
To:        Harald Schmalzbauer <h@schmalzbauer.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: a technical how to
Message-ID:  <3FD54A37.8050503@daleco.biz>
In-Reply-To: <200312090259.23677@harrymail>
References:  <20031209015125.74977.qmail@web14806.mail.yahoo.com> <200312090259.23677@harrymail>

next in thread | previous in thread | raw e-mail | index | archive | help
Harald Schmalzbauer wrote:

>On Tuesday 09 December 2003 02:51, homeyra g wrote:
>  
>
>>So, I hope this is the right address for this type of
>>question. If not would you please forward this and/or
>>let me know the correct address.
>>
>>Thanks,
>>
>>Here is the question: How to truncate a file from the
>>begining to a certain point in the file?
>>    
>>
>
>Have a look at sed. Sorry can't help with syntax and I'm sure one can also do 
>the same with perl or awk or whatever. But for the first, man (1) sed will 
>help with 'cat yourfile | sed -youroptions' e.g.
>
>You can also use vi (if it's a regular textfile with less than hundreds of 
>megs), find your endpoint with e.g "/YourEndKeyWord" and do in instruction 
>mode a "dG", after that save.
>
>-Harry
>  
>

And if you use PHP, you could do a fairly easy
script also, via the CLI.   Lots of shell scripting
stuff out there, isn't there?

KDK



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3FD54A37.8050503>