您的位置:首页 > 运维架构 > Linux

the diary about awk scp in linux

2017-04-17 17:54 597 查看

talk awk and scp

the awk

the awk is like cut , but it is more powerful , say you have a text file named "haha" , inside it you have structure like this:
asha haha 1
peter wawa 2
melme papa 3

so you can get the only first field using: awk "{print $1}" haha.
if you only wanna get the record whose number greater than 2,ie melme papa 3, using :awk "$3>2 {$1':'$2'-'$3}" haha

 the scp

scp equals secure copy,it's function like ssh(secure shell),helps you transfer data between remote and local machine.it's usage : scp ~/some.jpg username@187.167.17.18:~/haha.jpg.(from local to remote)
or scp usrname@187.167.17.18:~/haha.jpg ~/some.jpg(from remote to local)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: