What would be a way, using shell scripting, to take one line from two
separate text files, append them into one line, and output that
resulting line to another file? In the following script, I started to
"cat" them together, then "sort" them using the line number from the
"grep" command, however, I thought that it would be easier to read if
I could join the two pieces of data into one line. I just don't know
how to do that. I don't know any programming languages yet and have
only delved into shell scripts at this point. Thanks for your help,
Dow
Here is my starting point:
##########################################################
#!/bin/sh
#
# Checks acceptance ratio and emails to address specified
# in the command line.
#
# Example:
#
# Aslan 1% ./accept.ratio.sh ">email@dot.com ./confmem.log &
#
# The above example would look in the specified log file
# and email output to specified address
#
# Created by Dow Hurst Thu Mar 23 11:52:44 EST 2000
##########################################################
#Variables################################################
LOG_INPUT_FILE=$2
EMAIL_ADDRESS=$1
MCSTEP_GREP_OUTPUT=mcstep.grep.txt
RATIO_GREP_OUTPUT=ratio.grep.txt
##########################################################
grep -n 'MC Step (' $LOG_INPUT_FILE > $MCSTEP_GREP_OUTPUT
grep -n 'Actual acceptance ratio =' $LOG_INPUT_FILE \
> $RATIO_GREP_OUTPUT
##########################################################
--
__________________________________________________________
Dow Hurst Office: 770-499-3428
Systems Support Specialist Fax: 770-423-6744
1000 Chastain Rd.
Chemistry Department SC428 Email:">dhurst@kennesaw.edu
Kennesaw State University ">Dow.Hurst@mindspring.com
Kennesaw, GA 30144
*********************************
*Computational Chemistry is fun!*
*********************************
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.