简体   繁体   中英

Unix Shell Script Logic

My Primary Job role is not scripting, however I need to build a script for my Project need as one time. Pls advise some expertise !!..

Here is my ask. a. A script that can read all files in a directory. b. Each file has values like below ABC*I*2679956.33 Xx xx xx PCB*4304096*20181231*AH*0*AH>444*215341.25

The number of rows may be different, but I wanted to print "2679956.33" ( right after ABC I - This is constant) and 215341.25 ( right after AH>444*) as an email ...

Could you pls advise. Thanks

我不应该..但是..

awk -F "*" '{ print $3, $9 }' /yourfolder/* | awk '{ print $1, $6 }' | mailx -r sender@mail.com -s "subject" recipient@mail.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM