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 shell

This tag doesn't have any usage information yet.

This tag doesn't have a detailed wiki yet.

66%
+2 −0
Q&A How to count the lines of a file?

How to get the number of lines in a file? I.e. for a file like this: Line one Line 2 Final line I would like to do something like this: $ count-lines /path/to/the/file/above 3

2 answers  ·  posted 9d ago by Iizuki‭  ·  last activity 8d ago by Michael‭

Question shell file
71%
+3 −0
Q&A How to invert command exit code?

How to apply a logical not to a shell command, e.g. in a Bash script? So if the command exited with 0 (success) I would like it to be changed to a non-zero value, and if it exited with a non-zero ...

1 answer  ·  posted 4mo ago by Iizuki‭  ·  last activity 4mo ago by Iizuki‭

60%
+1 −0
Q&A How do I find files?

How can I search for files on my system? Ideally, I would like to search by various criteria, like date, name, extension, etc.

1 answer  ·  posted 6mo ago by matthewsnyder‭  ·  last activity 6mo ago by matthewsnyder‭

Question shell file
75%
+4 −0
Q&A Reverse shell with named pipe and netcat

This blog post describes a privilege escalation, exploiting tar's --checkpoint-action option. The privilege escalation is used to solve a TryHackMe challenge. The root user calls tar via cron whi...

1 answer  ·  posted 2y ago by Matthias Braun‭  ·  last activity 8mo ago by Kamil Maciorowski‭

Question shell networking
71%
+3 −0
Q&A Can I enter raw strings in fish to avoid escaping regexes for sed?

When running sed through fish, I often encounter a problem with regexes. Many commonly used regex control characters like []{}().+ need to be escaped, even if I type the regex in a single quoted st...

2 answers  ·  posted 8mo ago by matthewsnyder‭  ·  last activity 8mo ago by terdon‭

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 2y ago by deleted user  ·  edited 1y ago by fedorqui‭

Question shell bash password
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‭

22%
+0 −5
Q&A Do shells have anything to do with port forwarding or port triggering?

I find port forwarding and port triggering as advanced sub-topics of the topic of network protocols which include the "port" concept such as TCP and UDP. I am wondering if shells in general and Ba...

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

Question shell port
66%
+2 −0
Q&A grub loader can't detect Bliss OS | Shell

While this is about grub loader, this is likely to be a question of OS related. If it doesn't belong to this site than I will remove it. I had installed Bliss in sda2. Device Boot Start...

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

Question shell linux