changed fileformat of list.sh to unix

list.sh doesn't work in linux/mac due to its fileformat
This commit is contained in:
mutoo 2013-02-19 12:20:02 +08:00
parent a329817480
commit 4bc06c7fcb
2 changed files with 46 additions and 46 deletions

View File

@ -1,23 +1,23 @@
#!/bin/bash
append_str=' \'
list_alldir()
{
for file in $1/*
do
if [ -f $file ]; then
echo $file$append_str | grep .cpp
fi
if [ -d $file ]; then
list_alldir $file
fi
done
}
if [ $# -gt 0 ]; then
list_alldir "$1"
else
list_alldir "."
fi
#!/bin/bash
append_str=' \'
list_alldir()
{
for file in $1/*
do
if [ -f $file ]; then
echo $file$append_str | grep .cpp
fi
if [ -d $file ]; then
list_alldir $file
fi
done
}
if [ $# -gt 0 ]; then
list_alldir "$1"
else
list_alldir "."
fi

View File

@ -1,23 +1,23 @@
#!/bin/bash
append_str=' \'
list_alldir()
{
for file in $1/*
do
if [ -f $file ]; then
echo $file$append_str | grep .cpp
fi
if [ -d $file ]; then
list_alldir $file
fi
done
}
if [ $# -gt 0 ]; then
list_alldir "$1"
else
list_alldir "."
fi
#!/bin/bash
append_str=' \'
list_alldir()
{
for file in $1/*
do
if [ -f $file ]; then
echo $file$append_str | grep .cpp
fi
if [ -d $file ]; then
list_alldir $file
fi
done
}
if [ $# -gt 0 ]; then
list_alldir "$1"
else
list_alldir "."
fi