0

I have multiple .txt files that I am able to combine into one big .txt file. What I'd like to do before combining is have each file name be a column inside the .txt file. The filename is a date that is helpful when I eventually export the data into Excel.

When combining the .txt files, the file name does come in as a row...but not a column.

Thanks for any ideas or suggestions.

2
  • I would be helpful if you post your sample input and output.
    – kev
    Apr 13, 2012 at 12:24
  • Also what your OS is.
    – EBGreen
    Apr 13, 2012 at 12:33

1 Answer 1

0
$ perl -ne 'print "$ARGV,$_"' one two > three

$ cat three
one,aaa
one,bbb
two,ccc
two,ddd

$ cat one
aaa
bbb

$ cat two
ccc
ddd

Perl is included in most Linux distributions and is a free download on Windows.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .