MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Find c file Recursivly and Copy to Directory

Shell Script

scmuser created the topic: find c file recursivly and copy to directory

Write a shell script to find c file recursivly and copy to one common directory?

rajeshkumar replied the topic: Re: find c file recursivly and copy to directory
following program will serve your purpose…

#!/bin/sh
counter=0
if [ $# -eq 0 ]
then

for file in `find ./os -name “*.c”`
do
cp $file /root/Release/Rajesh
echo $file
counter=`expr $counter + 1`
done
else
echo “No Argument passed”
fi

echo “Number of files found=$counter”
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x