Skip to content

Tag: bash

Pipe to/from the clipboard in a Bash script

Is it possible to pipe to/from the clipboard in Bash? Whether it is piping to/from a device handle or using an auxiliary application, I can’t find anything. For example, if /dev/clip was a device linking to the clipboard we could do: Answer 2018 answer Use clipboard-cli. It works with macOS, Windows, Li…

Resize a list of images in line command

I would like to resize a list of images, all in the directory. To achieve that, I use convert from imagemagick. I would like to resize into I was wondering if there is a method to achieve this in a single command line. An elegant solution could be often useful, not only in this case. EDIT: I would like a

How to list running screen sessions?

I have a bunch of servers, on which I run experiments using screen. The procedure is the following : ssh to server XXX launch screen start experiments in a few tabs detach screen disconnect from the server While the experiments are running, I can easily find on which servers they are by sshing to all servers …

Setting environment variables in Linux using Bash

In tcsh, I have the following script working: What is the equivalent to the tcsh setenv function in Bash? Is there a direct analog? The environment variables are for locating the executable. Answer export VAR=value will set VAR to value. Enclose it in single quotes if you want spaces, like export VAR=’m…

Find all storage devices attached to a Linux machine [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question I have a need to find all of the writable storage devices attached to a given machine, whether or …