# create a new file

**URL:** <https://community.unix.com/t/create-a-new-file/217331>\
**Category:** Shell Programming and Scripting\
**Created:** [October 21, 2008, 5:43am UTC](https://community.unix.com/t/create-a-new-file/217331 "2008-10-21T05:43:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Satyak](https://community.unix.com/letter_avatar/satyak/32/6_22734026db12803ebb3e059622ac3534.png) [@Satyak](https://community.unix.com/u/Satyak)\
**Post date:** [October 21, 2008, 5:43am UTC](https://community.unix.com/t/create-a-new-file/217331/1 "2008-10-21T05:43:31Z")

</div>

hi  
i am using the followning code to create a new file in given folder

PATH="/home/sat/kat"  
ls $FILESPATH | while read filename  
do  
touch $PATH$filename  
.........  
done

but it is not working ,please help

thanks  
Satya

---

<div class="post-metadata">

**Author:** ![Franklin52](https://community.unix.com/user_avatar/community.unix.com/franklin52/32/500_2.png) [@Franklin52](https://community.unix.com/u/Franklin52)\
**Post date:** [October 21, 2008, 6:47am UTC](https://community.unix.com/t/create-a-new-file/217331/2 "2008-10-21T06:47:20Z")

</div>

Something like this:

```nohighlight
PATH="/home/sat/kat"
ls "$FILESPATH" | while read filename
do
touch "$PATH$"/"$filename"
.........
done

```

Regards
