我无法在linux中生成GPG密钥
sudo gpg --gen-key # This is the command to try to generate key
Run Code Online (Sandbox Code Playgroud)
错误
You need a Passphrase to protect your secret key.
gpg: problem with the agent: Timeout
gpg: Key generation canceled.
Run Code Online (Sandbox Code Playgroud)
请告诉我我在哪里做错了
我想将$ SPACE变量传递给expect脚本并获取输出并再次传递给shell脚本.
#!/bin/bash -x
SPACE=$(df -h | awk '{ print $5 }' | grep -v Use |sort -n |tail -1 | cut -d % -f1)
#set user "root"
#set ip "192\.168\.53\.197"
#echo $SPACE
expect<<EOF
spawn ssh "root\@192\.168\.53\.197"
expect "Password:"
send "Karvy123$\r";
expect "prompt"
send "$SPACE\r";
expect "prompt"
EOF
Run Code Online (Sandbox Code Playgroud) 我无法改变perl中的目录.
#!/usr/bin/perl
use strict;
my $dir=`date +%d%b%Y`;
#the output of $dir is 13Feb2014 that directory is already inside "/mnt/Recordings/Inbound/Kinrep/"
my $path = "/mnt/Recordings/Inbound/Kinrep/$dir";
chdir($path) or die "Cant chdir to $path $!";
Run Code Online (Sandbox Code Playgroud)
每当我执行我的程序时,我都无法更改我遇到错误的目录.
Cant chdir to /mnt/Recordings/Inbound/Kinrep/13Feb2014
No such file or directory at Ftp_transfer_197.pl line 17.
Run Code Online (Sandbox Code Playgroud)