NO1:sh脚本书写和后台运行,查看JAVA_HOME路径

sh脚本,后台运行:
执行脚本test.sh:./test.sh

更改sh脚本权限:chmod u+x *.sh

直接在后台运行脚本test.sh:./test.sh &


不中断的在后台运行test.sh:nohup ./test.sh &(test.sh的打印信息会输出到当前目录下的nohup.out中)
不中断的在后台运行test.sh另一个命令:setsid ./test.sh &

使用ps -ef |grep test.sh可查看到正在运行的test.sh脚本进程

脚本:vi test.sh

#!/bin/bash

cd ./bin/
pwd
echo "start flume"
./flume-ng agent --conf conf --conf-file ../conf/test1.conf --name a1 -Dflume.root.logger=INFO,console

查看JAVA_HOME路径
执行which java

[root@localhost ~]# which java 
/usr/bin/java 
执行ls -lrt /usr/bin/java

[root@localhost ~]# ls -lrt /usr/bin/java 
lrwxrwxrwx. 1 root root 22 10月 10 08:06 /usr/bin/java -> /etc/alternatives/java 
执行ls -lrt /etc/alternatives/java

[root@localhost ~]# ls -lrt /etc/alternatives/java 
lrwxrwxrwx. 1 root root 73 10

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
帮我把以下数据变成json格式:{ "switch_Cash": "Y", "pageMark": "add", "tx_date": "20230305", "cur_no": "1", "sfk_type": "03", "lease_type": "经营租赁", "change_rate": "0", "cap_name": "20220731SYZC000271", "lease_no": "20220731SYZC000271", "contract_key": "6980120220731001", "contract_name": "测试合同20220731-01", "bef_arch_area": "300", "bef_cash_rate: 2.38, "bill_type: 3, "bef_tax_rate: 5, "sfk_term: 4, "bef_tot_pay_time: 2, "bef_eve_amt: 22500, "exe_renew: N, "bef_renew_amt: 0, "bef_renew_eve_amt: 0, "bef_tot_pay_amt: 19047.62, "bef_unset_fin_exp: 221.39, "bef_contract_amt: 45000, "sige_date: 20220731, "bef_arch_position: 广州省佛山市宝芝林, "bef_effect_date: 20220801, "bef_mtr_date: 20240730, "bef_first_fk_date: 20220731,, "bef_renew_eft_date: , bef_renew_mtr_date: , aft_arch_area: 300, aft_bill_type: 3, aft_tax_rate: 5, aft_levy_rate: 5, aft_cash_rate: 2.38, aft_sfk_type: 03, aft_exe_renew: N, is_onchange: N, aft_sfk_term: 4, aft_contract_amt: 45000.00, aft_tot_pay_time: 2, aft_eve_amt: 22500, bef_renew_tot_pay_time: 0, max_term_seqn: 0, aft_effect_date: 20220801, aft_mtr_date: 20240730, aft_first_fk_date: 20220731, aft_renew_eft_date: , aft_renew_mtr_date: , bef_levy_rate: 5, cap_code: fjr0901, lease_no1: 20220731SYZC000271, aft_tot_pay_amt: 42857.14, aft_unset_fin_exp: 184.48999999999796, apply_amt: 23809.52, remark: test0609, change_valid_date: 20230609, cap_name_zh_: 测试资产-20230731-01, cur_no_zh_: 人民币, sfk_type_zh_: 周期性, flowable_: 1, flowable_targetNodeData: {"category":"CWSYS_69","isInput":"1","menuName":"使用权资产变更","pageNo":"cwsys_05_07"}, flowable_file_dataInfo: {"flowable_file_storeType":"undefined","flowable_file_split":false,"flowable_file_canDelete":true,"flowable_file_readOnly":false,"flowable_file_id":"FL-495eabb0-069c-11ee-9b92-59e9b66c35e6"}, cashList: [{"contract_no":"20220731HTXX000001","pay_date":"20220731","no":"20230201XJL000031","pay_amt":"25000.00","term_start_date":"20220801","create_trace_no":"16","tx_date":"0","trace_no":"0","term_end_date":"20230731","pay_sts":"未支付","version":"1","tax_rate":"0.00","term_seqn":"1","tax_amt":"1190.48","pay_sts_val":"0","id":"1","create_date":"20230201","levy_rate":"0.00"},{"contract_no":"20220731HTXX000001","pay_date":"20230731","no":"20230201XJL000032","pay_amt":"20000.00","term_start_date":"20230731","create_trace_no":"16","tx_date":"0","trace_no":"0","term_end_date":"20240730","pay_sts":"未支付","version":"1","tax_rate":"0.00","term_seqn":"2","tax_amt":"952.38","pay_sts_val":"0","id":"1","create_date":"20230201","levy_rate":"0.00"}] }
06-13

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值