Skip to main content

All Questions

Tagged with or
3 votes
5 answers
225 views

I've tried using sed for this. I've tried putting the lines of interest in variables as well. I have two examples I want to achieve for now. Lets say I have thousands of urls in a file called links....
shrykullgod's user avatar
3 votes
3 answers
876 views

The following script is supposed to check $1 and see if it is a specific value. It only works when one Bash [[... =~ ...]] regex check is passed in an if statement. The error is: When more than one ...
EmberNeurosis's user avatar
1 vote
1 answer
35 views

Disclaimer: I am brand new to bash I'm building a dialog box and trying to get some Docker commands to populate results. I am using this to return a result, which works for the most part. result=($(...
James Durand's user avatar
0 votes
2 answers
133 views

So, I was playing around with this answer, when I found that neither printf_stdin () { read input printf "$input" } sed "/lorem ipsum foobar/ { s/'/'\"'\"'/g s/\...
Grass's user avatar
  • 145
2 votes
1 answer
35 views

The following works: ls {000/487,000/488,000/489,000/490,000/491,000/492} ...many files being listed But this doesn't. Why ? LIST=000/487,000/488,000/489,000/490,000/491,000/492 ls {$LIST} ls: cannot ...
dargaud's user avatar
  • 659
1 vote
0 answers
53 views

Bash history works OK for except for sudo commands. Code from .bashrc follows. How can I modify the behaviour to include anything starting with sudo? NOTE. This behaviour is the same with a brand new ...
imazed's user avatar
  • 11
2 votes
1 answer
95 views

Using https://stackoverflow.com/a/7948533/31298396, we can implement flags for a script testing as follows: #!/bin/bash # Flags # Source: https://stackoverflow.com/a/7948533/31298396 TEMP=$(getopt ...
Grass's user avatar
  • 145
0 votes
1 answer
64 views

#!/bin/bash DefaultColor="\033[0m" GREEN="\033[32m" RED="\033[31m" PURPLE="\033[35m" YELLOW="\033[33m" CYAN="\033[36m" CmdOk="\033[...
Maxime's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
1818