Juan@Juan-XPS-2011 ~/tmp
$ cat File1.txt
A
B
C
Juan@Juan-XPS-2011 ~/tmp
$ cat File2.txt
A
D
F
Juan@Juan-XPS-2011 ~/tmp
$ sort -u File1.txt File2.txt
A
B
C
D
F
Juan@Juan-XPS-2011 ~/tmp
$ sort File1.txt File2.txt | uniq -d
A
Juan@Juan-XPS-2011 ~/tmp
$ sort File1.txt File2.txt | uniq -u
B
C
D
F
$ command | tee -a logs/`date +%Y-%m-%d_%H-%M-%S`_command.log
Vagrantfile
config.vm.provision "shell" do |s|
ssh_pub_key = File.readlines("#{Dir.home}/.ssh/id_rsa.pub").first.strip
s.inline = <<-SHELL
sed -ie 's/^.*: history-search-backward/\"\\e[A\": history-search-backward/' /etc/inputrc
sed -ie 's/^.*: history-search-forward/\"\\e[B\": history-search-forward/' /etc/inputrc
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
useradd #{ENV['USER']}
echo "%"#{ENV['USER']} " ALL=(ALL) ALL" > /etc/sudoers.d/#{ENV['USER']}
mkdir -p /home/#{ENV['USER']}/.ssh/
echo #{ssh_pub_key} >> /home/#{ENV['USER']}/.ssh/authorized_keys
chown --recursive #{ENV['USER']}:#{ENV['USER']} /home/#{ENV['USER']}/.ssh
chmod 700 /home/#{ENV['USER']}/.ssh/
chmod 600 /home/#{ENV['USER']}/.ssh/authorized_keys
SHELL
end