Estou tentando copiar um arquivo da máquina A:
apt policy openssh-client
openssh-client:
Installiert: 1:7.2p2-4ubuntu2.4
para a máquina B:
apt-cache policy openssh-client
openssh-client:
Installiert: 1:5.5p1-6+squeeze5
Com um:
scp myfile <server>:/myfile
md5sum myfile
2ba67c5e816350d4d2e2e7fd883037e7
file myfile
myfile: Python script, ASCII text executable
Em B:
md5sum myfile
8883620c2a0878da1db273101b55124d
file myfile
myfile: ASCII Java program text
Olhando para o arquivo de texto, parece que cada linha tem um espaço a mais do que a última, então, em vez de:
import argparse, os, sys
from subprocess import check_output
def count_voicemails(dir):
# find is faster than ls, since it does not check attributes
command = 'find {}/INBOX -maxdepth 1 | wc -l'
count = int(check_output(command.split()))
return count
Se parece com isso:
import argparse, os, sys
from subprocess import check_output
def count_voicemails(dir):
# find is faster than ls, since it does not check attributes
command = 'find {}/INBOX -maxdepth 1 | wc -l'
count = int(check_output(command.split()))
return count