AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-844507

Luis Abreu's questions

Martin Hope
Luis Abreu
Asked: 2025-01-20 04:20:02 +0800 CST

zsh 中的环境变量

  • 5

我想使用 curl 保存用于 TLS 的主密钥。根据文档,它支持SSLKEYLOGFILE环境变量来设置密钥的保存路径。

因此,我从这样一个简单的脚本开始:

export SSLKEYLOGFILE=~/tests/out_key.log
curl -is "https://some_site.com"

这确实有效,但我还发现我可以用一行代码来完成:

SLKEYLOGFILE=sslkey.log curl -s https://some_site.com

有人能解释一下为什么这样做有效吗?我以为这只SSLKEYLOGFILE适用于环境变量,而要做到这一点,我必须使用export关键字...我注意到将其分成两行是行不通的:

SSLKEYLOGFILE=sslkey.log 
curl -s https://some_site.com

那么,这里发生了什么事?

environment-variables
  • 1 个回答
  • 20 Views
Martin Hope
Luis Abreu
Asked: 2023-08-06 23:55:09 +0800 CST

Ipv6 与 Ipv4:有没有办法强制使用 ipv6?

  • 6

Ubuntu/Linux 初学者,所以我想知道是否有任何方法可以强制 Ubuntu 在解析名称时更喜欢 IPv4 或 IPv6(例如:google.com 有 ipv4 和 ipv6 地址。是否有任何设置允许我说 IPv6当某些应用程序要求使用该名称时,应该优先于 IPv4?)

谢谢。

dns
  • 1 个回答
  • 33 Views
Martin Hope
Luis Abreu
Asked: 2021-10-23 12:46:38 +0800 CST

Remmina:升级到 ubuntu 21.10 后,RDP 双显示器支持不起作用

  • 0

在继续之前,这里是关于 remmina 的版本信息:

/snap/remmina/5073/usr/bin/remmina: /snap/remmina/5073/gnome-platform/usr/lib/x86_64-linux-gnu/libffi.so.7: no version information available (required by /snap/remmina/5073/usr/lib/x86_64-linux-gnu/libwayland-client.so.0)
Load modules from /snap/remmina/current/usr/lib/remmina/plugins
Remmina plugin glibsecret (type=Secret) has been registered, but is not yet initialized/activated. The initialization order is 2000.
The glibsecret secret plugin has been initialized and it will be your default secret plugin

org.remmina.Remmina - SNAP Build - 1.4.21 (git e73ddab1f)

NAME                TYPE            DESCRIPTION                                                     PLUGIN AND LIBRARY VERSION
EXEC                Protocol        Execute a command                                               1.0       
GVNC                Protocol        Remmina VNC plugin for GNOME and KVM                            0.1b      
RDP                 Protocol        RDP - Remote Desktop Protocol                                   RDP plugin: 1.4.21 (Git e73ddab1f), Compiled with libfreerdp 2.4.1 (2.4.1), Running with libfreerdp 2.4.1 (rev 2.4.1), H.264 Yes
RDPF                File            RDP - RDP File Handler                                          RDP plugin: 1.4.21 (Git e73ddab1f), Compiled with libfreerdp 2.4.1 (2.4.1), Running with libfreerdp 2.4.1 (rev 2.4.1), H.264 Yes
RDPS                Preference      RDP - Preferences                                               RDP plugin: 1.4.21 (Git e73ddab1f), Compiled with libfreerdp 2.4.1 (2.4.1), Running with libfreerdp 2.4.1 (rev 2.4.1), H.264 Yes
SPICE               Protocol        SPICE - Simple Protocol for Independent Computing Environments  1.4.21    
VNC                 Protocol        Remmina VNC Plugin                                              1.4.21    
VNCI                Protocol        Remmina VNC listener Plugin                                     1.4.21    
WWW                 Protocol        Remmina web-browser plugin                                      0.1.0     
glibsecret          Secret          Secured password storage in the GNOME keyring                   1.4.21    

Build configuration: HAVE_ARPA_INET_H=1 HAVE_ERRNO_H=1 HAVE_FCNTL_H=1 HAVE_NETDB_H=1 HAVE_NETINET_IN_H=1 HAVE_NETINET_TCP_H=1 HAVE_SYS_SOCKET_H=1 HAVE_SYS_UN_H=1 HAVE_TERMIOS_H=1 HAVE_UNISTD_H=1 WITH_AVAHI=ON WITH_CLEANUP=OFF WITH_FREERDP3=OFF WITH_GCRYPT=ON WITH_GVNC=ON WITH_ICON_CACHE=ON WITH_IPP=OFF WITH_LIBRARY_VERSIONING=ON WITH_MANPAGES=ON WITH_NEWS=ON WITH_SSE2=ON WITH_TRANSLATIONS=ON WITH_UPDATE_DESKTOP_DB=ON
Build type:          Release
CFLAGS:              -isystem/builds/Remmina/Remmina/parts/remmina/install/usr/include -isystem/builds/Remmina/Remmina/stage/usr/include -fPIC -Wall -Wno-unused-result -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wimplicit-function-declaration -Wredundant-decls
Compiler:            GNU, 9.3.0
Target architecture: x64

升级到 Ubuntu 21.10 后,多显示器支持似乎不再正常工作。我可以看到这些选项并且它们已被激活,但 RDP 会话将仅使用其中一个监视器。

关于我可以做些什么来解决这个问题的任何线索?

谢谢。

multiple-monitors
  • 1 个回答
  • 1940 Views
Martin Hope
Luis Abreu
Asked: 2021-09-23 03:34:04 +0800 CST

zsh:了解 wc 的命令输出并将其传递给其他命令

  • 1

我正在尝试创建一个复杂的命令(使用 shell 替换和算术表达式),我想知道是否有人可以帮助我理解wc命令的输出。

例如,这里有几个例子:

[11:10:33] labreu:~ $ wc -l test.txt
5 test.txt
[11:10:40] labreu:~ $ cat test.txt| wc -l
5

为什么命令返回不同的值?我试过查看它的手册页,但没有任何关于它的内容......

顺便说一句,我只是在问这个问题,因为我试图使用以下命令跳过文件的 x 行:

[11:25:35] labreu:~ $ tail -n "+$(( $(wc -l test.txt)-2 ))" test.txt                       
zsh: bad math expression: operator expected at `test.txt-2...'

在注意到wc返回number_of_lines filename并且使用管道(或重定向会产生不同的结果)之后,我设法通过使用以下方法获得了我需要的东西:

tail -n "+$(( $(wc -l<test.txt )-2 ))" test.txt

tail -n "+$(( $(cat test.txt | wc -l )-2 ))" test.txt 

无论如何,主要问题仍然存在:为什么该wc命令在管道中使用(或输入重定向)时返回不同的输出?

谢谢

zsh
  • 1 个回答
  • 1051 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve