Questions tagged [command-line-arguments]
Programming command line utilities that take parameters.
command-line-arguments
5,062
questions
0
votes
0
answers
44
views
setup function in class doesn't work as expected while passing parameterized values
I have no idea why modifying the code mentioned here to the following doesn't work? The variables are not accessible inside the tests and setup is being invoked before every test despite the scope ...
0
votes
0
answers
15
views
How do I modify parameterized values in conftest and pass them to multiple testcases in pytest
The problem:
Let us say that there are 10 steps required for a process to complete. I start the steps of the process 1 by 1 and in between these steps, I would like to make different assertions. After ...
0
votes
1
answer
21
views
Shell how to pass only some user input to script?
If I have a very simple shell script like this:
echo "thing 1?"
read input1
echo $input1
echo "thing 2?"
read input2
echo $input2
How can I call the script/command with only 1 of ...
1
vote
4
answers
150
views
How to properly escape single quotes in filenames?
I have files with single quotes in their name, say o'a. I want to process them in awk (gawk-5.3.0):
(fd is an alternative to find).
Please don't tell me about fd -x option, my command is snippet of a ...
-2
votes
1
answer
48
views
Is it possible to get the exact script invocation in Python?
I would like my python script to produce a text file containing the exact command line the user entered to invoke the script. In the past, I have done the following in bash:
echo "$0" "$...
1
vote
1
answer
49
views
Change command which works in cmd.exe to work in powershell.exe
I have a command which works without issue in cmd.exe:
%TESTING_INSTALLATION_PATH%\\client\\batch.exe --log-level=error --run %CI_BUILDS_DIR%\\autotest\\jobs\\clear.py
But it doesn't work in ...
0
votes
1
answer
67
views
Unnecessary terminals opening when using .bat script
I want to use terminal script to open both of my working folders using VS code at once. I'm currently using this
@echo off
start code "path to folder 1"
start code "path to folder 2&...
0
votes
0
answers
27
views
Start Chrome with device emulation (iPhone 12 Pro) from a script in Windows
I use Google Chrome with Internet to run automated tests and I would like to know if there is a way to launch Chrome in emulation mode.
For example:
I tried a workaround with the --emulation-mode=&...
0
votes
1
answer
35
views
Passing a string argument to bash causes syntax error
I am trying to run a bash script for rescaling fMRI data using AFNI's 3dcalc.
One of the arguments for this function is "expr" which will "Apply the expression - within quotes - to the ...
0
votes
0
answers
18
views
Windows 10 SendTo selected files passed as parameters will not work if they contain commas but no spaces
This is a SendTo-specific issue related to how Windows Explorer passes the multiple selection file paths to the handling cmd script.
Since Windows Explorer establishes the convention for how multiple ...
0
votes
0
answers
12
views
Command Line for opening RTC Eclipse Client 6.0.2 with a specific username and password file
My command line for opening RTC Eclipse Client is:
"C:\Program Files\IBM\TeamConcert\eclipse.exe" -product com.ibm.team.concert.product
Can I add anything on the end of the command line to ...
0
votes
1
answer
80
views
How can I run a batch file with command line arguments using AutoIT
webui.bat --use-zluda --debug --autolaunch
I want to run this batch file (webui.bat) with these command line arguments (--use-zluda --debug --autolaunch).
The batch file is located at 'F:\automatic\...
0
votes
0
answers
28
views
Why does passing bearer token to a shell script not work but embedding the value does [duplicate]
I have a shell script foo.sh
curl -i -X GET 'https://example.com/bar' \
-H '...
2
votes
1
answer
50
views
Can't save names in typedef instances
I'm trying to create a voting project in c where you get the candidates names in command line and then the voters number and votes. The function bool vote(char name[]) counts the votess and the void ...
0
votes
2
answers
87
views
How to define separator characters for argparse?
Python's argparse module is a powerful tool for parsing script command line arguments. The problem is that it expects the args to be separated by spaces. Is there a way to let argparse know I am using ...