On Sun, Apr 1, 2012 at 7:22 PM, Bharath Kumar
<bharath79in at rediffmail.com> wrote:
Hi ILUGC members,
Thanks for your valuable suggestion. I have modified the code in such a way
that if I search for an open office file that has 'spaces' in the name, it
will output the kind of file.
Essence of the code :
I will create a file in the name that was converted from space format to
underscore format.
I will open the document file and save it in the format as per the extension.
This is only for open document file.
Code Snippet
#!/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"
read input1
export input1=`echo $input1 | tr ' ' _ `
touch ${input1}
ooffice ${input1}
file ${input1}
I would like to know how to write 'if' condition for image, audio, video
files etc.