|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
shell script help to facilate the faxing
dBase Reader and Converter V. 0.6, (c) 2002 - 2003 by Bjoern Berg
FAXNAME: LA COMPUTER COMPONEN FAXTEL: 23020834 FAX_GROUP: FAX_DESCP: FAXNAME: MUSTANG COMPUTER TEC FAXTEL: 23110692 FAX_GROUP: FAX_DESCP: FAXNAME: MANDARIN COMPUTERISE FAXTEL: 23111720 FAX_GROUP: FAX_DESCP: .... File CO_01.DBF was closed successfully. need to take away the first and last line as well as the faxname ...etc except the faxno so 11111111 22222222 33333333 44444444 in such fashion. can u help, please. |
|
#2
|
|||
|
|||
|
From the command line you could do:
grep FAXTEL <xx_zz.DBF> | awk '{ print $2 }' If it needs to go to an out file: grep FAXTEL <xx_zz.DBF> | awk '{ print $2 }' > <name.outfile> If you want to script this (called the script tel_from_fax): Code:
#!/bin/bash
#
# tel_from_fax <infile> <outfile>
#
# infile must be given
# outfile is optional (if none given: fax_tel_only.<yymmdd>)
INFILE="$1"
OUTFILE="$2"
[[ -z ${INFILE} ]] && echo "No input file given. Quiting" && exit 1
[[ -z ${OUTFILE} ]] && OUTFILE="fax_tel_only.`date '+%y%m%d'`"
grep FAXTEL ${INFILE} | awk '{ print $2 }' > ${OUTFILE}
|
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Scripts > shell script help to facilate the faxing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|