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.
Thanks and Regards,
Bharathkumar A.V.
On Sun, 25 Mar 2012 22:02:57 +0530 wrote
Hi ILUGC members,
I have written a shell script to find out what type of file is the file I am
This is my 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" // Comments : I will copy the file
//to find out what type of file it
read input1
file ${input1}| cut -d: -f 2
Thanks,
Bharathkumar A.V.