I've got a directory of about 6000 txt files that look like this:
I need to execute a command on them to combine them and, in the end, have one big file with all the needed columns taken form all the 6000 files. I've got the "combining" program, but my problem is that once I've combined the first two files that output file should be the input file for adding the third one and so on.
Here is a schematic:
I've created a list of all the files than need to be combined (named master-infile) and wrote this loop:
But the looping variables seem to be all wrong and all sorts of weird combinations of files get combined. I guess I need to get a count of output files? Any ideas?
Any help would be greatly appreciated!
Last edited by vbe; 08-20-2016 at 10:55 AM..
Reason: icode tags => code tags
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)
Discussion started by: pc2001
5 Replies
LEARN ABOUT DEBIAN
mwrap
MWRAP(1) MWRAP manpage MWRAP(1)NAME
mwrap - Octave/MATLAB mex generator
SYNOPSIS
mwrap [-mex outputmex] [-m output.m] [-c outputmex.c] [-mb] [-list] [-catch] [-c99complex] [-cppcomplex] infile1 infile2 ...
DESCRIPTION
mwrap is an interface generation system in the spirit of SWIG or matwrap. From a set of augmented Octave/MATLAB script files, mwrap will
generate a MEX gateway to desired C/C++ function calls and .m function files to access that gateway. The details of converting to and from
Octave's or MATLAB's data structures, and of allocating and freeing temporary storage, are hidden from the user.
OPTIONS -mex specifies the name of the MEX function that the generated functions will call. This name will generally be the same as the prefix
for the C/C++ output file name.
-m specifies the name of the Octave/MATLAB script to be generated.
-c specifies the name of the C MEX file to be generated. The MEX file may contain stubs corresponding to several different generated
files.
-mb redirect Octave/MATLAB function output to files named in the input. In this mode, the processor will change Octave/MATLAB function
output files whenever it encounters a line beginning with @. If @ occurs alone on a line, the output will be turned off; if the
line begins with @function, the line will be treated as the first line of a function, and the m-file name will be deduced from the
function name; and otherwise, the characters after @ (up to the next set of white space) will be treated as a filename, and mwrap
will try to write to that file.
-list print to the standard output the names of all files that would be generated from redirect output by the -mb flag.
-catch surround library calls in try/catch blocks in order to intercept C++ exceptions.
-c99complex
use the C99 complex floating point types as the default dcomplex and fcomplex types.
-cppcomplex
use the C++ complex floating point types as the default dcomplex and fcomplex types.
mwrap 2012 MWRAP(1)