Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Posts tagged bash

This tag doesn't have any usage information yet.

This tag doesn't have a detailed wiki yet.

50%
+0 −0
Q&A How to list the first x files in each directory

MWE With the following tree: l1 └── l2 ├── d0 │   ├── f0 │   ├── f1 │   ├── f2 │   ├── f3 │   ├── f4 │   └── f5 ├── d1 │   ├── f0 │   ├── f1 ...

3 answers  ·  posted 7mo ago by mcp‭  ·  last activity 6mo ago by matthewsnyder‭

Question bash zsh ls find cp
75%
+4 −0
Q&A Documentation for double asterisk glob expansion

Where can I find documentation on double asterisk in glob expansion? It is discussed in the .gitignore section of Pro Git. It works in ls **/* to list all terminal files. It is supported by py...

2 answers  ·  posted 8mo ago by mcp‭  ·  last activity 8mo ago by Kamil Maciorowski‭

Question bash glob
71%
+3 −0
Q&A Treat underscores as word boundaries in terminal using vim mode

Question How do you specify underscores as Vim word boundaries when using vim mode in either bash or zsh? MWE w on this_word should place the cursor on the underscore. A second w should place th...

1 answer  ·  posted 1y ago by mcp‭  ·  last activity 8mo ago by r~~‭

Question bash zsh vim
81%
+7 −0
Q&A How to get number of files in directory

How do you find out the number of files in a directory from the command line?

4 answers  ·  posted 1y ago by mcp‭  ·  last activity 10mo ago by AdminBee‭

Question bash zsh ls
40%
+2 −4
Q&A How to give password in shell script?

That's my Bash script: #!bin/sh cd qpixel sudo systemctl enable mysql mysql -u root -p rails s When it executes the line mysql -u root -p it will ask for password. To do so, I have tried...

1 answer  ·  posted 3y ago by deleted user  ·  edited 1y ago by fedorqui‭

Question shell bash password
66%
+2 −0
Q&A How to make vi-mode bindings in terminal copy to clipboard

If I want to yank my last command I can UP yy, but this does not copy to the system clipboard. How do I configure my terminal to copy to the system clipboard so I can paste into other programs? ...

1 answer  ·  posted 2y ago by mcp‭  ·  last activity 1y ago by deleted user

Question bash zsh vi-mode
77%
+5 −0
Q&A Capture separate _and_ combined stdout/stderr

Using BASH, how can I redirect stdout and stderr each, to two separate files, simultaneously? That's a mouthful, let me clarify a little: I have a hypothetical script that may/will generate outpu...

1 answer  ·  posted 2y ago by jaybeers‭  ·  last activity 2y ago by Quasímodo‭

Question shell bash
80%
+6 −0
Q&A A shell script that can run under different shells

I have a shell script with a syntax compatible to both bash and zsh, except for a section that has zsh specific syntax that throws syntax errors if sourced from bash. Is there an easy way to escap...

2 answers  ·  posted 2y ago by 4015.alt‭  ·  last activity 2y ago by mjy‭

86%
+11 −0
Q&A In a bash shell script, how to filter the command line argument list to unique entries only, for processing each?

I have a handful of shell scripts that accept any number of command line arguments, then do some relatively expensive processing based on each command line argument in turn. The general format for ...

3 answers  ·  posted 2y ago by Canina‭  ·  last activity 2y ago by Quasímodo‭

37%
+1 −3
Q&A Running several commands without && or ; or ()

I copy-paste several commands at once from a markdown editor (Typora) to Bash in a Putty window terminal; the file I work with reads as follows (empty lines included): $ non sed command 1 $ non s...

1 answer  ·  posted 2y ago by deleted user  ·  last activity 2y ago by Grove‭

Question bash syntax