小编zyy*_*zyy的帖子

如何跳过输出的第一行?

这是问题,我想计算我在 hpc 中的作业数量,但这不是现成的功能之一。所以我做了这个简单的脚本

squeue -u user_name | wc -l
Run Code Online (Sandbox Code Playgroud)

wheresqueue打印所有作业,如下所示

> squeue -u user_name
   JOBID PARTITION NAME     USER ST       TIME  NODES NODELIST(REASON)
 8840441    theory cteq      fxm PD       0:00      1 (Resources)
 8840442    theory cteq      fxm PD       0:00      1 (Priority)
 8840443    theory cteq      fxm PD       0:00      1 (Priority)
 8840444    theory cteq      fxm PD       0:00      1 (Priority)
Run Code Online (Sandbox Code Playgroud)

这将被输送到wc并计算行数。但是,第一行不是作业的条目。wc计数时如何指示跳过第一行?或者我应该只取wc减一的输出?

提前致谢!

wc

10
推荐指数
3
解决办法
1万
查看次数

如何消除 tmux 状态栏中多个窗口状态之间的间隙?

我想删除 tmux 状态栏中的多个窗口状态之间的间隙

状态栏

但我不知道如何,这是我的设置

## current window and pane indices at bottom left corner
set-window-option -g window-status-current-format "\
#[fg=colour239, bg=colour202, bold] #I, #P \
#[fg=colour239, bg=colour214, bold] #W \
#[fg=colour214, bg=colour237]"

## other windows and panes indices at bottom left corner
set-window-option -g window-status-format "\
#[fg=colour239, bg=colour117] #I, #P \
#[fg=colour239, bg=colour118] #W \
#[fg=colour239, bg=colour237]"
Run Code Online (Sandbox Code Playgroud)

你能帮我解决这个问题吗?提前致谢!

如果您需要更多信息,请告诉我。

tmux

2
推荐指数
1
解决办法
2639
查看次数

标签 统计

tmux ×1

wc ×1