ファイルから値列を読み取り、1つずつ印刷します。

ファイルから値列を読み取り、1つずつ印刷します。

私のxyz.csvファイルには次のデータが含まれています。

**abc_hosts,def_host_id,sde_host_id,hostname,dffff_status,status,eeee,eeeeee,tttt,name1,name2,name3,**
start,,,,,,,,,,,,,,,,,,,
,2,3,eee,4,4,rrr,ggggg,323232,22323,2323232,sfdsfd,223333,443433323,45343,5445,213132,fdsfdfdfd,2332332321,3
end,,,,,,,,,,,,,,,,,,,

ベストアンサー1

説明で述べたように、IPアドレスはeth0このコマンドを実行できるかどうかに応じて常に含まれる行にあります。

grep eth0 Platform_Configuration.csv | cut -d',' -f5 | tr -d '**'

おすすめ記事