try
awk -F'\t '{print $3,$4,$5,$1,$2,$6}' input > output
это установит FS (разделитель полей) для IFS (вход) и OFS (выход).
Я также поменял местами $1
и $2
Попробуйте эту команду для «липкого ssh»:
while true; do command ssh "$@"; [ $? -eq 0 ] && break || sleep 0.5; done
Взято из :http://backreference.org/2013/04/26/ssh-auto-reconnect/
Выполните ls -l
на своем /etc/rc3.d
или /etc/rc5.d
в зависимости от вашего уровня выполнения. Здесь следует отметить, что сетевой демон запускается перед демоном ssh. поэтому ping
доступен до ssh
. Вы, вероятно, должны wait
немного больше, прежде чем выполнять ssh
на удаленной машине. В моем случае есть около 19 служб, которые запускаются после сети, но до ssh.
lrwxrwxrwx 1 root root 17 Sep 9 2011 S10network ->../init.d/network
lrwxrwxrwx 1 root root 16 Sep 9 2011 S11auditd ->../init.d/auditd
lrwxrwxrwx 1 root root 21 Sep 9 2011 S12restorecond ->../init.d/restorecond
lrwxrwxrwx 1 root root 16 Sep 9 2011 S12syslog ->../init.d/syslog
lrwxrwxrwx 1 root root 20 Sep 9 2011 S13irqbalance ->../init.d/irqbalance
lrwxrwxrwx 1 root root 19 Sep 9 2011 S15mdmonitor ->../init.d/mdmonitor
lrwxrwxrwx 1 root root 19 Sep 9 2011 S18rpcidmapd ->../init.d/rpcidmapd
lrwxrwxrwx 1 root root 17 Sep 9 2011 S19rpcgssd ->../init.d/rpcgssd
lrwxrwxrwx 1 root root 15 Sep 9 2011 S20kdump ->../init.d/kdump
lrwxrwxrwx 1 root root 20 Sep 9 2011 S22messagebus ->../init.d/messagebus
lrwxrwxrwx 1 root root 24 Sep 9 2011 S23setroubleshoot ->../init.d/setroubleshoot
lrwxrwxrwx 1 root root 15 Sep 9 2011 S25netfs ->../init.d/netfs
lrwxrwxrwx 1 root root 15 Sep 9 2011 S25pcscd ->../init.d/pcscd
lrwxrwxrwx 1 root root 15 Sep 9 2011 S26acpid ->../init.d/acpid
lrwxrwxrwx 1 root root 19 Sep 9 2011 S26haldaemon ->../init.d/haldaemon
lrwxrwxrwx 1 root root 14 Sep 9 2011 S26hidd ->../init.d/hidd
lrwxrwxrwx 1 root root 20 Sep 9 2011 S26lm_sensors ->../init.d/lm_sensors
lrwxrwxrwx 1 root root 16 Sep 9 2011 S28autofs ->../init.d/autofs
lrwxrwxrwx 1 root root 15 Sep 9 2011 S50hplip ->../init.d/hplip
lrwxrwxrwx 1 root root 15 Sep 13 2011 S50snmpd ->../init.d/snmpd
lrwxrwxrwx 1 root root 14 Sep 9 2011 S55sshd ->../init.d/sshd