Skip to main content

All Questions

Tagged with or
-7 votes
0 answers
53 views

How does the sudo useradd and use del commands work? [closed]

I don't understand the concept of add and deleting users including the secondary group stuffs
Rashidat Abiodun Haruna's user avatar
4 votes
3 answers
171 views

Get Character Code for Character in File Name

Short version: I am at a bash command line. In some directory, I can ls various files and see their names. I would like to get something like the ASCII character code for each character in a file's ...
ASV's user avatar
  • 43
-4 votes
3 answers
138 views

How to make this command prompt?

I want this command prompt. Any ideas?
Danijel's user avatar
  • 224
-5 votes
1 answer
79 views

To have ., the source synonym, workable [closed]

The bash' command source has been modified in one of few ways: alias function overriding or else Then how can its synonym: . got being so too (problem is it's not letter) ?
user17227456's user avatar
0 votes
1 answer
18 views

How to set a bind -V variable from the bash command line, not ~/.inputrc? [duplicate]

$ bind -V | grep horiz print-completions-horizontally is set to `off' How do I set it to `on' from the bash command line? I know how to set it in ~/.inputrc. That's not my question.
Dan Jacobson's user avatar
2 votes
1 answer
229 views

x2 sudo commands cannot be executed in terminal

I am running a Ubuntu system on my Radxa Zero 3E (single board computer) Using its GPIO I am driving a 5V LED via an NPN transisitor. Everything works. For switching it on I use gpioset $(gpiofind ...
nightcrawler's user avatar
4 votes
2 answers
276 views

Custom separator in ps

I have this integrated in a bash-script on an outdated Debian 10. ps -axo "%p ;;; %a" Works well, output is like 10161 ;;; [kworker/0:1-cgroup_destroy] 12173 ;;; [kworker/2:0-events] 12379 ;...
chris01's user avatar
  • 1,009
0 votes
3 answers
171 views

Execute bash commands one at a time

I have a list of bash commands that I'd like to execute one at a time. They could be in a file, or the terminal, or whatever is necessary. But I'd like to execute the first one then I'd check the ...
Mike's user avatar
  • 280
-8 votes
1 answer
93 views

"File name too long" when printing a long base64 string. Why?

Downloading an image and encoding it into base64: curl -o output.jpg https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/USA-San_Jose-De_Anza_Hotel-3.jpg/500px-USA-San_Jose-De_Anza_Hotel-3.jpg ...
Franck Dernoncourt's user avatar
15 votes
2 answers
2k views

Why does "seq 1000000 | tee /dev/stdout" produce more single-digit numbers than expected?

I'm in Linux and in Bash. I expect seq 1000000 | tee /dev/stdout to always output 9 numbers from 1 to 9 and their duplicates (18 in total). But when I do seq 1000000 | tee /dev/stdout | grep -c '^[1-...
decision-making-mike's user avatar
7 votes
1 answer
339 views

Cannot delete bash associative array element

Consider an associative array in bash (versions 5.2.15(1)-release and 5.2.21(1)-release): declare -A ufs=(); ufs["one"]=1; ufs["two"]=2; ufs["three"]=3 printf '> %s\n' ...
Chris Davies's user avatar
7 votes
4 answers
496 views

Grep with output of not the complete line

With grep I can filter lines. But if the lines are pretty long it gets messy. How can I only get "some chars around" my search-string? f.txt this is a red cat in the room this is a blue ...
chris01's user avatar
  • 1,009
5 votes
4 answers
427 views

How can I find common prefixes in file names to group them?

I would like to be able to find all files in multiple directories whose file names start with the same string, but preferably not if that string is only one word or contains fewer than perhaps 5 ...
EmmaV's user avatar
  • 4,419
4 votes
1 answer
798 views

Why does bash need file descriptor duplicating?

I found out I don't totally understand how bash file descriptors work. I would like to have some guidance here. I have a scenario where I need to read the content of a file, and for each line of the ...
sylye's user avatar
  • 716
1 vote
2 answers
89 views

Use numbered file descriptors with SSH

I need to pipe data through SSH to a command that reads stdin. The command needs to run with sudo so I need to be able enter the sudo password, too. Without ssh, I'd use numbered file descriptors like ...
con-f-use's user avatar
  • 434

15 30 50 per page
1
2 3 4 5
1818