Awk
- pkill
#!/bin/bash ps -ef|grep "$*" |grep -v grep| awk '{ print $2 }' |xargs kill
- Convert a DOS file to Unix
awk '{ sub("\r$", ""); print }' dosfile.txt > unixfile.txt
- Convert a Unix file to DOS
awk 'sub("$", "\r")' unixfile.txt > dosfile.txt
#!/bin/bash ps -ef|grep "$*" |grep -v grep| awk '{ print $2 }' |xargs kill
awk '{ sub("\r$", ""); print }' dosfile.txt > unixfile.txt
awk 'sub("$", "\r")' unixfile.txt > dosfile.txt