hi all
i am etl guy
i have shell script that i use to do processing on file.
the problem is that i want it to use on multiple files at same time
is there any way of passing the file name since my all my filename start with samename like abc*
p,ease let me know
you can use the for i in `ls abc*` command. Try that and post what you have if it doesn't work.
yeah it work but i want to write output of each file into another file as tgt_file
like input of file1 into tgt_file1
like input of file2 into tgt_file2
just to add i need to create outpiut file name on fly
You can create a variable. Then add 1 to the variable and make that part of the output name.
For example
sh-3.2$ count=0
sh-3.2$ for i in `ls file*`
> do
> count=$(($count + 1))
> cat $i > "newfile${count}"
> done