formatting a string
From: Steve Buehler (steve_at_ibapp.com)
Date: 02/28/05
- Previous message: McDougall, Marshall (FSH): "RE: Old RH books for new RH system user"
- Next in thread: Ed Wilts: "Re: formatting a string"
- Reply: Ed Wilts: "Re: formatting a string"
- Reply: Michael Schwendt: "Re: formatting a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 28 Feb 2005 09:56:23 -0600 To: redhat-list@redhat.com
I am writing a shell script (#!/bin/sh) that will change some file names
around but am having trouble formatting a string. If I have a string like
this:
20050202
How can I change it to:
2005-02-02
I have about a thousand files so it isn't really feasable for me to be
changing the names manually. All of the files are similar to this and I
have everything in the script to make the change but this one problem.
I have looked into "printf" and "awk/split", but I don't think either one
of these would work for me. Maybe one would, but I just couldn't figure it
out. Any help would be appreciated.
Thanks
Steve
-- redhat-list mailing list unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list
- Previous message: McDougall, Marshall (FSH): "RE: Old RH books for new RH system user"
- Next in thread: Ed Wilts: "Re: formatting a string"
- Reply: Ed Wilts: "Re: formatting a string"
- Reply: Michael Schwendt: "Re: formatting a string"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|