>
> #!/bin/bash
> echo -e "Input the file that you want to search: c"
> read input
> find ~ -name ${input}
> echo -e "Input the file that you want: c" // Comments : I will copy the
> file with the full name that I want
>                                           //to find out what type of file
> it is
> read input1
> file ${input1}| cut -d: -f 2
>

you can use the following bit and operate on $file_name

export file_name=`echo $input1 | tr ' ' _ `
$ echo $file_name
Untitled_Document_1

you can add more checks to know if it is file is a  directory or file and
process appropriately

-Satya
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to