[KLUG Members] url encode in a bash script
Bruce Smith
members@kalamazoolinux.org
Thu, 27 May 2004 10:26:52 -0400
> Maybe I'm making things too complicated. I simply want to get the date
> of a local file from within a bash script. I was thinking of capturing
> the output of stat and sending it off to parse elsewhere. The output of
> stat has spaces, etc., so it needs to be urlencoded before sending. If
> I could get just the date, which is already in the format of YYYY-MM-DD,
> I could send that off as-is.
stat my.file | grep '^Modify:' | cut -d' ' -f2
(assuming you want the modify date)
- BS