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.

27 questions with no upvoted or accepted answers
3 votes
1 answer
1k views

I have a function which can take main arguments and then sub-arguments. Some of these sub-arguments are filenames. The current completion code I have is as follows. _scm() { local cur prev opts ...
Hashken's user avatar
  • 343
2 votes
0 answers
84 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
2 votes
2 answers
238 views

If I pass variable as a positional argument to a function, is it possible to determine the name of the variable used from inside the function, or I can only access its value? I have a function envir-...
Vera's user avatar
  • 1,373
2 votes
1 answer
4k views

I can run an executable in the background and detach it from the terminal with these commands: $ nohup ./executable & or $ ./executable & $ disown But none work if I send arguments to the ...
Azkron's user avatar
  • 21
2 votes
1 answer
740 views

If, in Ubuntu's Nautilus, I click a midi-file, a window opens to specify an application for processing the file. Another option is a "user generated command" (UGC). (Let me choose Ubuntu, Nautilus, ...
KlausF's user avatar
  • 21
2 votes
0 answers
1k views

I have two systems, let say one is the server and the other is the client. I want to load kernel image from the server to the client through the network. I used dhcp (isc-dhcp-server) and tftp (...
khaleel's user avatar
  • 51
1 vote
1 answer
257 views

I installed WhatsApp Desktop via Wine and I am trying to associate whatsapp:// links with it. Executing the following via command line works and starts a chat with the phone number +1234567890: env ...
Mike's user avatar
  • 459
1 vote
1 answer
240 views

To add options, I have the following in one of my scripts: parse_opts() { while [ $# -gt 0 ]; do case "$1" in -h|--help) help=1 shift ;; -r|--...
Amarakon's user avatar
  • 413
1 vote
0 answers
482 views

I am writing a simple script (well, I thought it would be simple) to gather and log a 'reason' for using sudo. That part is working pretty straightforward based on another article I found (https://...
Gabriel Hayes's user avatar
1 vote
0 answers
1k views

I have a bash script that accepts a number of optional flags and two required arguments. Currently, if the command line call is ~/script.sh -a -b arg1 arg2 it works just fine, but if the call is ~/...
Josh's user avatar
  • 323
1 vote
0 answers
437 views

I've got an issue while using LFTP with some script files. lftp -f download.lftp the script looks something like that for now: open -u someurl mirror -i "somefile*.zip" --only-missing ... somehow ...
user3066027's user avatar
1 vote
1 answer
820 views

I have a list of files that I want to search across a list of database tables: [root@host hs]# head -n 3 tables rec_playinth120116 rec_playinth120216 rec_playinth120316 [root@host hs]# head -n 3 ...
has's user avatar
  • 11
1 vote
0 answers
393 views

I'm having a little bit of trouble figuring out how I can use a bash array for an argument list. so far, the below code does not work. The %s below is Midnight Commander specific. F=(%s); for i in "$...
mrrhq's user avatar
  • 83
1 vote
2 answers
333 views

I'm looking for a solution that will automatically allow me to call a function with specific parameters in a certain situation. Here is the specific scenario: When an error occurs, I can set up my ...
nfarrar's user avatar
  • 411
0 votes
1 answer
401 views

I have a docker container setting an ARG to CMAKE_ARGS=-DWITH_CPU=arm -DCMAKE_C_FLAGS="-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad" -DCMAKE_CXX_FLAGS="-...
Matt H.'s user avatar

15 30 50 per page