I need little help with parsing.
I want to parse filename and one level up directory name.
sample $1 will consists of
/home/username/ABC1/rstfiles4.log
/home/username/ABC4/rstfiles2.log
/home/username/EDC7/rstfiles23.log
/home/username/EDC6/rstfiles55.log
/home/username/rstfiles15.log
So in this i want to parse like
ABC,rst*.log
EDC,rst*.log
,rst.log
Thanks Chubler_XL..
my path is not fixed. my script takes path as input parameter...
and that path contains the common characters like
any path/ABC*/rst*.log
any path/EDC*/rst*.log
any path/rst*.log
Becuase after getting this,ABC* or EDC* i will need to perform action on that like ABC.* == ABC.* then direct it ot csv file