黑马程序员技术交流社区
标题:
【上海校区】Shell读取hdfs配置文件内容
[打印本页]
作者:
不二晨
时间:
2019-3-15 16:18
标题:
【上海校区】Shell读取hdfs配置文件内容
hdfs上文件内容
[root@node00 test]# hdfs dfs -cat /test/jdbc.properties
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.10.1:3306/
jdbc.username=root
jdbc.password=123456
读取内容脚本
#!/bin/bash
user=`hdfs dfs -cat /test/jdbc.properties |sed '/^jdbc.username=/!d;s/.*=//'`
echo $user
---------------------
【转载,仅作分享,侵删】
作者:storm_fury
来源:CSDN
原文:
https://blog.csdn.net/weixin_43215250/article/details/84847430
版权声明:本文为博主原创文章,转载请附上博文链接!
作者:
不二晨
时间:
2019-3-20 17:10
加油,感谢分享
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2