Hi all,
Please help me decide this problem. I have a converter application getting its parameters by specified format. Ie: -date2007-02-14
Also I have a files named yyyyMMdd.rar format. So how do I convert the file name to it.
Input:
20070214.rar
Output:
-date2007-02-14
I wrote the following scripts but can't know how to concat them.
Code:
string=20070214.rar
echo $string | cut -c1-4
echo $string | cut -c5-6
echo $string | cut -c7-8