I very new to C Shell. I am trying to do is read from Command line.

Find the if the file is zip, .txt, symbloic link,pipe, unknow (if file is not zip, txt, sy....)

here is what I what got so far. I am very stuck atm Please help me out :


if ( "echo ${1} | cut -d'.' -f2" == "zip" ) then
echo $1 is a zip file
echo sorry, $1 is not a zip file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.