Thread: need help!!! View Single Post
dljp's Avatar
dljp
New Member
Posts/Threads: 16/6
Thanks: 1
Thanked 14 Times in 11 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Rep Power/Points: 0/551
dljp is an unknown quantity at this pointdljp is an unknown quantity at this pointdljp is an unknown quantity at this pointdljp is an unknown quantity at this pointdljp is an unknown quantity at this pointdljp is an unknown quantity at this point
Default Posted December 14th, 2006, 02:36 PM #2 (permalink) |
Quote:
Originally Posted by goru
View Post
hi, nt quite sure why i am posting it in BF and whether nyone will reply or nt.

I need to create multiple output file like
output_1.txt
output_2.txt
...output_100.txt
in a DO loop.

any one have any idea, i think in banglaforum there are quite a few good programming expert exits.
Write a shell script that you can make executable.
-----------------------------------------------------------------------
#!/bin/sh
set -x

varx=1

HOME_DIR=/home/user/workingdirectory
cd ${HOME_DIR}
while [ $varx -le 100 ]; do
touch output_${varx}.txt
varx=`expr $varx + 1 `
done
--------------------------------------------------------------------------
Put the path of the current directory in the place of /home/user/workingdirectory

Copy what is written within the lines above in a text file. Name the text file anything, say, createfile

Use the command

chmod 775 createfile

in a shell terminal. Then execute by writting
./createfile

You can also do the same in a terminal command line directly.

Of course, all these are for Linux/Unix environment.

| Reply With Quote
The Following User Says Thank You to dljp For This Useful Post:
mina (October 30th, 2007)