David Crouch wrote:
On 12/3/05, Jim Cunning <jcunning@cunning.ods.org> wrote:
On Sat, 2005-12-03 at 21:15, David Crouch wrote:
Thanks again for the previous help. That went so quick, maybe another one?
I'm looking for a simple way to strip the first 8 characters of every file in a directory. This one has me confused, I admit. I know it can be done... just not sure how. "cut" will do what you want. See 'man cut' Actually I might have answered a bit too quickly, because you didn't give enough information. You want to strip the first 8 characters of each file's contents, or the 1st 8 of the files' names? In either case,
On Sat, 2005-12-03 at 21:33, Jim Cunning wrote: the solution is more involved than my original answer implied--and also different depending on your objective. -- Jim Cunning <jcunning@cunning.ods.org>
Let me clarify. I want to strip the first 8 characters off each file in a given file name. Sorry for the confusion. Cut works, partly, I've figured out how to strip the charazcters, but not how to rename with the results.
What are you renaming? The new file? Why should that be a problem? You should have the original filename as one of the command parameters. Perhaps if you were to give an example of what you're trying to do, as right now you're generating more questions than answers.