A Payroll Shell Code

Source: Internet
Author: User

Personnel pay before the payroll is sent to our mailbox, look at the personnel sister paper is a kind and beautiful gu cool, so wrote a shell code to achieve bulk text to each mobile phone number. Not much to say, on the code, in fact, very simple, I am embarrassed to upload, or record it, later can be blown. The principle is that the calendar salary.csv in every piece of data, this code is the most powerful jar package, not the jar package, I do not use this code, tomorrow to upload an email to achieve the same function of the shell code.

#!/bin/bashsendmsg="/data/x5online/sendphonemsg.jar"Detailtxt="Salary.csv" whileRead Line DoName=`Echo$line |awk '{print $}'' Phone=`Echo$line |awk '{print $}'' Totalsalary=`Echo$line |awk '{print $}'' Othersalary=`Echo$line |awk '{print $4}'' Kaoqingkouchu=`Echo$line |awk '{print $}'' Shebaokouchu=`Echo$line |awk '{print $6}'' Gongjijingkouchu=`Echo$line |awk '{print $7}'' Personaltax=`Echo$line |awk '{print $8}'' Reallysalary=`Echo$line |awk '{print $9}'`    /usr/bin/java-jar ${sendmsg} ${phone} Dear ${name}, your salary for this month is ${totalsalary}, the other payroll totals are ${othersalary}, the attendance deduction is ${kaoqingkouchu}, Social Security deduction is $ {Shebaokouchu}, Provident Fund deduction for ${gongjijingkouchu}, personal tax deduction for ${personaltax}, real pay for ${reallysalary}, and finally wish you a pleasant work.  Done< $Detailtxt
Shell Code

A Payroll Shell Code

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.