Skip to main content

Questions tagged [arguments]

An argument is usually defined as the actual value passed to a function, procedure, or command line program.

3 votes
3 answers
871 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
4 answers
201 views

So I've ran into a bit of a wall, I have an option in my script that calls a function which allows me to specify a file/directory and then I want to parse that output into a menu tool (using dmenu in ...
hollowillow's user avatar
5 votes
4 answers
957 views

I'm trying to build a wrapper to execute a tool multiple times, then concatenate some of the results. I'd like to pass two sets of files to my wrapper script, then run the tool for each pair of files. ...
Whitehot's user avatar
  • 245
2 votes
0 answers
60 views

Suppose I want to do this: find . -exec tool {} extra-arg + It doesn't work and I know why: -exec … {} + does not allow extra-arg(s) between {} and +. So be it. It seems I can inject the extra-arg by ...
Kamil Maciorowski's user avatar
0 votes
1 answer
62 views

I want to list all the directories in present directory and pass those directories as a argument to another find command The below example will explain it correctly. $ find . -maxdepth 1 -type d . ./...
user27072144's user avatar
0 votes
1 answer
184 views

My small POSIX shell scripts do not usually take any arguments, so this is kind of new to me... The minimal snippet would probably look like this: # default for hotkey variable on top of script is set ...
Vlastimil Burián's user avatar
0 votes
1 answer
73 views

I have a script with this usage: myscript [options] positional-args... -- [fwd-params] Because [options] can have long, or short variants, I like using getopt. But I'm having troubles. I use getopt ...
Stewart's user avatar
  • 16.1k
3 votes
1 answer
638 views

I wrote a script that needs to call a command and pass on arguments. My script has its own parameters but some need to be passed through. This fails when arguments to my script have spaces in them. ...
Ned64's user avatar
  • 9,296
0 votes
2 answers
154 views

I have a program that tries to trigger a screenlock using the following commands: xdg-screensaver lock xscreensaver -lock cinnamon-screensaver-command --lock The problem is that I'm using ...
guttermonk's user avatar
2 votes
2 answers
693 views

To check if $i equals any command line argument (in a Bash script), I use if [[ " $@ " =~ " $i " ]] Is there a better way? I mean, a way that is more recommendable, more general, ...
Convexity's user avatar
  • 121
1 vote
1 answer
450 views

I'm using parameter substitution with an error message, such as ${var1:?'some message'}. I've incorporated a multi-line error message. Presently, it only functions properly when enclosed within single ...
programmer Erfan's user avatar
1 vote
2 answers
216 views

Is there a way to hide a single argument passed into the terminal, but still pass the argument to the command? This question addresses the problem of passing a plain-text password through the shell. ...
Jesse's user avatar
  • 355
2 votes
1 answer
272 views

I am working on a a script that need to take two script arguments and use them as variables in the script. I couldn't get this working and unable to find out what I am doing wrong. I see the issue is ...
MO12's user avatar
  • 409
0 votes
2 answers
314 views

I have a python program that requires 2 arguments input-file and output-file. It reads input-file and creates a copy of that file with some modifications in the output-file. I created a text file with ...
Data Engineer's user avatar
2 votes
4 answers
3k views

I know many have asked similar questions, but I can't make it work. I have a file called Dependencies: Accounts Aggregates Blog Configuration Contacts Contents DataTypes Forms Geo Globalization Media ...
Saeed Neamati's user avatar

15 30 50 per page
1
2 3 4 5
36