Hi zajtat,
If combining.executable infile1 infile2 > outfile1 produces the output you said it does, then running the command:
won't give you the output you said you want (it would put the data from infile3 before the data from end of the infile2 in outfile2 discarding everything from infile1, wouldn't it); wouldn't you need to use:
instead???
Do all of the ~6000 text files you want to combine have names that end in .txt (or some other single filename extension)? Are there any other files in that directory that have names that end in the same filename extension? If the 1st answer is yes and the 2nd answer is no, why do you need master-infile? Why not just use for i in *.txt? And, no, you don't want nested loops for this. What you have shown us in post #1 will combine two copies of infile1 into a files named 1 through 6000, and then for each of your other input files overwrite each of those numbered files with a combination of two copies of the next file in master-infile keeping only the 6000 copies of the combination of two copies of the last input file named in master-infile.
Is my interpretation of the commands you need to run correct? If not, please explain more clearly what arguments you are trying to pass to the command combining.executable.
Do you really want to keep outfile1 through outfile6000, or do you just want one outfile to be the combination of the 6000 input files? (Putting 12000 files in a single directory is usually a great way to slow down processing any files in that directory.)
Are you always processing exactly 6000 files, or do you just want to combine all of your text files (either based on a filename matching pattern or on the list of files in master-infile) no matter whether than is two files or a thousand files?
What is the format of the real names of your input files?
What name do you really want for your output file(s)?
This site has been very helpful thus far.. I thank you all in advance for sharing the knowledge. Let me get to it.
I am trying to write a very small script to take away from the boredom of doing the same thing over and over.
Everynow and again I have to get the hex value of a file using a... (2 Replies)
Hi,
I am having an Input file .which is having a list of names.
comapring with our database , needs to write the out put in file called output.txt , format should be name--> country--->phone number
could you please help me..
thanks in advance (7 Replies)
Hi there
could anybody point me in the right direction when it comes to looping through the output of a system command in perl (i.e. df -k) doing a test against each line to see if it matches?
for example if i have a df -k output like this and I wanted to grab the lines that matched "sda" or... (3 Replies)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Hi friends,
I'm newbie to SVM.
Just wanna try installed it on one of our server (to do mirroring for disk0 and disk1) but i think im lost until now. :(
the steps i've taken is as below:-
1.prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
2.metadb -a -c 3 -f c1t0d0s7... (3 Replies)
Legends,
I want to remain in the script until user passes the correct name.
I had tried the below code; but it didn't work out.
Please help
echo "\nPlease enter the source system: \c"
while read SYSTEM_NAME
do
if ];
then
echo "\nMaking $SYSTEM_NAME as source system for particular... (5 Replies)
I have been trying this program for a long time. I am trying to read a file named "odon" line by line; read the first line, send it to do a command saved in a file "perm", once the first line has finished going through the content of the file perm, the result is saved with the number of the line.... (17 Replies)
Hi all,
I am trying to loop through the string contents of an array, to add it during the saving of the output files. I am trying this code to print each column and save it to unique file name, but it doesn't work. Thanks for any help.
fnam=(japan usa uk)
alldata.dat contained sample data... (1 Reply)
Hi,
I have some output from 'ls' command and I want to loop over the output in a bash script. What would be a good way to go about it?
For example, if the output of the ls command gives me 'prefix1 prefix2 prefix3', how can I set a loop that will iterate over these?
many thanks! (5 Replies)