[root@www ~]# cat 123.txt JDBC.URL=jdbc:oracle:thin:@127.0.0.1:1521:orclDBC.URL=jdbc:oracle:thin:@
[root@www ~]# cat 123.txt
JDBC.URL=jdbc:oracle:thin:@127.0.0.1:1521:orcl
DBC.URL=jdbc:oracle:thin:@127.0.0.1:1521:orcl
DC.URL=jdbc:oracle:thin:@127.0.0.1:1521:orcl
[root@www ~]# echo "`cat 123.txt |grep -i ^jdbc.url | awk -F "=" '{print $2}'`1234567890"
jdbc:oracle:thin:@127.0.0.1:1521:orcl1234567890
[root@www ~]# echo "`awk 'BEGIN {FS="="} {IGNORECASE=1} /^jdbc.url/ {print $2}' 123.txt`1234567890"
jdbc:oracle:thin:@127.0.0.1:1521:orcl1234567890
--结束END--
本文标题: awk中FS指定分隔符和IGNORECASE忽略大小写
本文链接: https://lsjlt.com/news/40189.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0