Structure Query Language, C programming, Java, Servlet, Jsp, Unix
Home
Special
C / C++
GTU [PL/SQL]
IVAN BAYROSS [SQL]
JAVA
UNIX
WTAD
FON
Contact Us
CPP
Android
SEO
Wednesday, 22 February 2012
Write a script to find the global complete path for any file.
clear
echo "Enter file name : "
read filename
str=`find . -name $filename`
if [ "$str" == "" ];then
echo "File not found"
exit 1
fi
path=`pwd`
len=`echo $str | wc -c`
str=`echo $str | cut -d "." -f 2-3`
echo "Full path of file is $path$str"
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment