script to change file name

Posted on 2006-04-06
Last Modified: 2013-12-27

on Solaris 10, with tcsh

I have 1000 files which are named something like:

I am looking for a tcsh script to rename them without the quotes:

Many thanks
Question by:peledc
    1 Comment
    LVL 38

    Accepted Solution

    Why do you want to use csh/tcsh for script?
    For shell scripting you should use sh/ksh, it is a lot easy to do things than csh/tcsh.

    please have a look at "Csh Programming Considered Harmful":

    Here's a ksh script can do the job for you:

    cd /path-to/mydir   # replace it the the real dir name in your system

    for file in `ls *\"*` ; do
        newname=`echo $file | tr -d \"`
        mv $file $newname

    echo " Job done !"
    # End of script

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (, discussed installing the Solaris Operating S…
    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now