[KLUG Members] url encode in a bash script
Adam Tauno WIlliams
members@kalamazoolinux.org
Thu, 27 May 2004 10:21:31 -0400
> I appreciate the link, but I can't read the script. It looks like it
> requires a file instead of a variable, and I'm not sure how to include
> an outside script in the current script.
Hmmm, I don't remember. I had this in my bookmarks. I think I used it
at some point, but awhile ago.
> 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.
How about -
awilliam@estate3:~> stat flashplayer.xpt | grep ^Change | cut -f2 -d" "
2004-05-26