i want to give a filename in commandline itself and want to check whether it is a directory are not.shall i use this command
if [ -f $filename ]
i want to give a filename in commandline itself and want to check whether it is a directory are not.shall i use this command
if [ -f $filename ]
if [ -d $1 ]; then
ls -l $1>file1.txt;
awk -f '{print tolower($8)}' file1.txt;
else
echo "it is not a directory";
fi
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.