Skip to main content

All Questions

Tagged with
1 vote
0 answers
31 views

Alt + . but search for recent arguments

In bash when I press Alt + . (which is mapped to yank-last-arg), it will switch through arguments I used last to invoke CLI programs. Is there something like a search for it? Something like Ctrl + R ...
glades's user avatar
  • 117
1 vote
4 answers
1k views

How can I get the absolute path of a file deep within a directory?

Here's an example of directory level0 contents in a tree-like format. However, suppose it is huge and contains many files as I am omitting many of them here: $ tree level0 level0 └── level1 └── ...
showkey's user avatar
  • 437
0 votes
1 answer
37 views

How to find key codes to use in readline applications? [duplicate]

I'm trying to create readline macros and bindings, but struggling to find codes for some key sequences. How to find codes for key combinations, like "\e[1;2A" for Shift-Up, etc? By the way, ...
Alex's user avatar
  • 1
1 vote
2 answers
134 views

Start Script with SSH Session Name and Date Time

I am a network engineer, and I am trying to transition off of using programs like securecrt into fully linux based. However, the biggest thing keeping me from migrating is logging SSH output into ...
ritkit's user avatar
  • 11
0 votes
0 answers
89 views

When HDMI is plugged into computer, run script

Setup Headless single board computer (this one) which has an HDMI input (To clarify, this is a port which takes in HDMI like a monitor would. It will receive HDMI feed, not export it, like a computer ...
EthanL's user avatar
  • 1
-1 votes
2 answers
70 views

Does this exist: xterm bash in frame window custom? [closed]

Is there a style to [xterm + bash scripts, commands] inside a custom frame? i will wish this style, see example: ╭─────────────────────────┤text title1├────────────────────────╮ │ ...
Manuel songokuh's user avatar
1 vote
0 answers
36 views

Going to the direcory of a file as fast as posible [duplicate]

Is there a way to get to the path of a file as fast as possible and in the least amount of keystrokes. Context: Type cd and then paste the path of a file and then have to go back and hit backspace ...
GumGun's user avatar
  • 11
0 votes
1 answer
526 views

"_split_longopt: command not found" when trying tab-completion

For the past couple of weeks or so, I've noticed that, often, when I press the Tab key to try and complete a command in a bash shell in a terminal, I get an error message. It says: bash: ...
einpoklum's user avatar
  • 10.4k
3 votes
2 answers
697 views

How to limit the number of files printed by ls and print them in columns like ls prints normally?

Here is extension of the question: How do I limit the number of files printed by ls? with additional condition: how to print results in as many columns as fit to the current terminal width — as ls ...
Anton Samokat's user avatar
0 votes
1 answer
55 views

Is the idea of having a login shell and a non-login shell merely a way of making user preferences? [duplicate]

Scouring the internet about the difference between a login shell and a non-login shell, it turns out that the ultimate difference is merely the files that are being sourced. A login shell sources some ...
JLC's user avatar
  • 327
0 votes
3 answers
116 views

Play sound after command and also pipe output

I can easily pipe the output of a command like: some_command | less I can also easily play a sound after a command like: echo test; print \\a aplay, beep or others could also be used for sound. ...
Luis's user avatar
  • 101
1 vote
1 answer
155 views

Bash completion after quotation mark

I am experimenting with bash completion to write a general completion library in C associated with command line parsing and stumbled in a behavior for which I can find no documentation. I am using the ...
user1542207's user avatar
1 vote
0 answers
102 views

Shell: Customizing the "Display all N possibilities? (y or n)" message

I already know that double-pressing the Tab key on Bash terminal will enlist all files and folders in the current working directory or, when appropriate, show Linux executables that I can run. I want ...
groaking's user avatar
1 vote
1 answer
154 views

Shell script to run command and show output in notification box

I have command line utility that generates text strings, by running a command within the directory: ./Utility -P it prints output on terminal. How to make a shell script showing the generated string ...
minto's user avatar
  • 553
12 votes
2 answers
5k views

Check if current user can run sudo without requiring a password

I want to check if the current user running a BASH shell script has access to passwordless sudo or not. If they don't, I'd rather have the script exit rather than prompting them for a password.
Jay Taylor's user avatar

15 30 50 per page
1
2 3 4 5
66