Unix SED /AWK Win XP DOS COMMAND LINE

May 29, 2010 at 12:30:14
Specs: Windows 7
Hi, I have a problem, I want to use DOS (requirement) with sed or awk or any other dos commands to somehow take the output of a DIR /AD/B which shows only the folders in the current directory. then I use Sed to append #'s to each line like 1), 2), 3) etc. This is easy to do, but the problem I am having is to then make it (after the 22nd one, start the 23-44 in the 2nd column, and then 45-66 in the 3rd column). Like:
1) 23) 45)
2) 24) 46)
... ... ...
I WISH I HAD CAT OR JOIN but im on windows in dos. I've already thought about possible options since the only multi column output dir has lists it horizontally.
I could have it split column 1 into file1, col2 into file2, col3 into file3. But I can't figure out how to concatenate each file together. As in all line1's together, all line2's together and all line3's together.

I could also try to get it to append to a file so I have:
file1 line1
file2 line1
file3 line1
file1 line2
etc... output to file4
and then use sed to remove the new lines to tack lines 1,2,3 in file4 together, and 4,5,6 and so on to achieve the same result.

I could even try to just use the wide multicolumn dir command to output it in multi column and then swap locations of elements but idk how to swap it in columns AND lines etc to achieve the desired result.

help is much appreciated. I'm using the numbered output so that I can receive input and have it designated to that number, which is an easy task, the concatenation part is hard as hell however.



See More: Unix SED /AWK Win XP DOS COMMAND LINE

Report •

#1
May 29, 2010 at 13:24:01
If you prefer to use Unix command, look here:

http://openetwork.com/berk.html

MIKE

http://www.skeptic.com/


Report •
Related Solutions


Ask Question