Linux Shell Scripting
I want to write a short shell script to read a date from the keyboard using the read command. The date should be of the form “10/12/03”. The first number should be placed in a variable “month”, the second into a variable “day”, the third into the variable “year”. I alos want to print each variable on a separate line. Assume all dates are in this format: mm/dd/yy.
Would it be easy or difficult to modify my script to accept input of the form mm-dd-yy? Can someone please tell me how to do it!! |
Re: Linux Shell Scripting
Quote:
Quote:
Quote:
|
|
sed variables revisted
same question pretty much. im working on a script to rename files. I found a mp3 rename script as follows
Code:
if [ "$1" ] Here's what I have so far, the last sed statement keeps putting "$CURDIR" instead of the value of pwd. Code:
CURDIR=$(pwd) Thanks guys. Oh, and this is not homework...for fun as Linux should be! Once working I'll share the working vesion with a "for" loop. |
got it..
Code:
CURDIR=$(pwd | sed 's/\//\\\//g') |
All times are GMT -5. The time now is 04:11 PM. |