Dear Experts,

to give a better picture i will explain the directory structure first

the files have the same naming convention and the only difference is the first letters which is the title of that account, there is a total of 210 files only the bold letters change for each file
exe: file 1,
file 2

-----> /KG-02
i have to concatinate these file with all the other files of similar name in the different directories, so i can have one account summary.

id appreciate any help

for i in Data/KG-*;do cat "$i"/ACT/*dat>"${i##*/}.dat";done

thanks, but i got an error message declaring illegal variable name

for i in Data/KG-*;do cat "$i"/ACT/*dat>"${i##*/}.dat";done

You're using a very old shell, try with a different one: bash, ksh, zsh (for example, do not use /usr/bin/sh on Solaris).

Works Perfectly ,, Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.