0

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 :

!/bin/csh

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

Edited by deceptikon: Moved to shell scripting forum

1
Contributor
1
Reply
18
Views
3 Years
Discussion Span
Last Post by chubbyy.putto
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.