我正在尝试执行以下命令:
cat "$HOME/.mozilla/firefox/*.default/sessionstore-backups/recovery.js" | \
sed " + "\"" + "s/" + "\\" + "\\_closedTabs.*//" + "\"" + " | \
sed " + "\"" + "s/{/" + "\\" + "n{/g" + "\"" + " | \
egrep -o 'url.*attributes' | cut -d" + "\\\"" + " -f3
但是什么也没发生。我没有网址列表。 我正在此方法上传递此命令:
private static string ExecuteProcess(string command)
{
var p = new Process()
{
StartInfo = new ProcessStartInfo
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
RedirectStandardInput = true,
FileName = "/bin/bash",
Arguments = $"-c \" " + command + " \""
}
};
p.Start();
p.WaitForExit();
return p.StandardOutput.ReadToEnd();
}