Questions tagged [arguments]
The arguments tag has no usage guidance.
50
questions
3
votes
1
answer
2k
views
Command line 7Zip to create archive without extension
If I specify full extensionless result path 7zip adds one corresponding to the type of created archive.
How can I make it name the result file exactly as I have specified in command line argument?
0
votes
1
answer
3k
views
DOS .bat script not passing on arguments
We have a problem on one PC, which seems not to be honouring arguments in .bat scripts, i.e. not passing them on to invoked python scripts. It works fine on 10 or so other very similar machines.
We ...
1
vote
1
answer
741
views
How woulld I add $OPTARGs from one arg to an array
So I'm trying to add values from an optarg to an array. I've got:
arrays=()
while getopts a: args; do
case $args in
a) arrays+=$OPTARG;;
esac
done
echo $arrays[@]
When I run the script, ./...
1
vote
2
answers
12k
views
How to create a desktop shortcut from a batch file
I know there are many posts on this issue but there is a minor twist to what I need to do.
I can figure out how to create a shortcut with an argument like this:
"C:\Program Files\My App\App.exe" /s
...
0
votes
2
answers
7k
views
Why does my Bash script display the "too many arguments" error at the cp command?
Here is my script, I get the error "line 33: [: too many arguments", I'm confused why, surely only 2 arguments are being provided to cp here?
I am providing two directories to the script with no ...
0
votes
1
answer
3k
views
How to pass a variable to a WMI query run in a batch file?
I want to run the following in a batch file and prompt the user to enter "NewUserID", then insert it as a variable. Can this be done with WMI?
wmic useraccount where name='user'call rename name='...
3
votes
1
answer
3k
views
how to put my arguments into a Bash alias command?
i usually have the following simple alias in my bashrc:
alias g="grep --color=always --exclude-dir=\*.svn\*"
but now i have to work on systems that only have GNU grep 2.5, hence no --exclude-dir ...
72
votes
9
answers
122k
views
Can I use pipe output as a shell script argument?
Suppose I have a bash shell script called Myscript.sh that need one argument as input.
But I want the content of the text file called text.txt to be that argument.
I have tried this but it does not ...
0
votes
1
answer
2k
views
Opening and passing arguments to an application using a shell script on a Mac
I am trying to write a shell script on a Mac which opens RIATest and passes it parameters. My code is:
#!/bin/bash
echo THIS TEST!!!
open -a '/Applications/RIATest 4/RIATest.app' --args /b /r /e 5 ...
2
votes
1
answer
285
views
Why is Excel showing 'c' as the arg separator for fomulas?
In Excel 2007, I have a cell with
"=if(true,1,0)"
as the contents. If I hit the ENTER key
I get an error dialog which says, "The formula you typed contains an error."
The flyover help for ...
7
votes
1
answer
10k
views
How to preserve white space in Bash arguments
I use the command:
cm1 cm2 arg1 arg2 'argument 3'
It first goes to cm1, which will then redirect arg1 arg2 'argument 3' to another file.
/usr/bin/cm1:
#! /bin/bash
# some script here
shift
cm2 $@
...
0
votes
1
answer
873
views
option -f for linux command
this is the content of test file:
this this
this that
is that
a that
MAP that
map that
when I do uniq testCase -f1, the result is:
this this
this that
which is reasonable, but if ...
25
votes
4
answers
27k
views
zip: Argument list too long (80.000 files in overall)
I need to compress 80.000 files into multiple zip files. This is the command I use:
zip -s 200M photos_test/*
However I get the following error:
-bash: /usr/bin/zip: Argument list too long
What ...
28
votes
9
answers
229k
views
How to pass an argument to a Windows Scheduled Task with spaces in it
I need to set up a Windows Scheduled Task. It accepts 1 parameter/argument which is a path and can contain spaces. My Scheduled task does not work - it "breaks" the parameter up at the first space.
...
0
votes
1
answer
160
views
Is there a Unix Find command generation web page
I use to refer to a web page that use to generate unix find command line options based on option that I select in the form. Unfortunately I lost the book mark and not able to recollect it.
Does any ...