I do have the ability to put delimiters between the fields,
In this case it is even a lot easier to do it. One will not have to rely on these complicated heuristics era had to resort to in absence of delimiters (great job, btw., era) but could use simply "cut" to split every line into fields, then use "printf" to output the fields in a formatted way.
Suppose your delimiter will be "|" (the pipe symbol) then your file would look like (just header and one line):
The reformatting is quite easily done now by the "cut"-utility: cut reads a line of text (aka "records") and splits it up into "fields" using a separator character. I show the logic in ksh here because this is easier to understand, the same functionality could be done in awk but the resulting code would be less intuitive.
Quote:
The much more difficult part of this is the fact that this information is being sent out as an email by my server. I need to reformat the data, then resend it out to an email address that is contained in another field in a different section of the email.
Not at all difficult: suppose you have already extracted the adressing part and put it in variables:
How exactly the address and subject is to be extracted is depending on the form of the input file. Just give us an example and i am sure someone or other can work that one out.
Quote:
Lastly, there about 40 of these emails every hour that need to be parsed and 'resent' out.
This poses no problem. If there is a certain condition (for instance a file is produced by your software, etc.) to watch for the script i sketched out could run in a loop looking every x seconds for the condition to become true and than act accordingly, otherwise wait for another x seconds. 40 mails an hour should pose no problems even for the smallest p505 there is. The execution for such a script will typically take a fraction of a second.
Hi,
This stems from the following thread https://www.unix.com/showthread.php?t=18299
I have a makefile which makes either executables or a shared library.
i.e. make -f unix.mak will create the executables and
make -f unix.mak libolsv will create the shared library.
Since these have to be... (4 Replies)
Hi,
Recently I install a package and try to do a make and make install.
However, in the make it gives me below error:-
make:Nothing to be done for 'install-exec-am'
make:Nothing to be done for 'install-data-am'
Can anyone please explain to me what does this mean? I have been trying... (1 Reply)
I attached a README file that I will refer to.
I successfully completed everything in the README file until step 4.
# pwd
/gani/gani-2.4.4
# ls
COPYING Makefile.macros gem.c
Makefile Makefile.sparc_gcc gem.h
Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies
4. Post Here to Contact Site Administrators and Moderators
In light of this board's rule stating "no BSD vs. Linux vs. Windows or similar threads," is the following post legal (can I post it)?
Hi. I'm thinking about obtaining a web server for business purposes and I want to learn to administer and maintain the server myself. I need to be able to use... (1 Reply)
hello all,
attached you can find a tool (written in C) that i really need to make it compile under linux
i am able to compile and run it successfully in mac os x, but in linux the compilation fails
the only thing that i did so far is to change the following
#include <sys/malloc.h> to... (13 Replies)
Hi,
While installation of apache on linux, we perform the below tasks.
1) Untar
2) configure
3) make
4) make install.
I wanted to understand the difference and working of configure/make/make install.
Can any one help me understanding this?
Thanks in advance. (1 Reply)
I have been trying to split up my src directory to clear out files that are not re-compiled very often. Now I have the following setup in my trunk,
trunk/bld
trunk/src/
trunk/src/src_server
trunk/makefile.linux
In the make file, I have compile rules
SOURCELOC = src
# compile src c++... (4 Replies)
I am trying to create a makefile to build a program and am getting the following error:
make -f tsimplex.mk
make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop.
OPSYS = $(shell uname -s )
TARGET = tsimplex
ROOTDIR = ../../..
GTSDIR =... (1 Reply)