Questions tagged [command]

A command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell. Use [command-pattern] for the design pattern.

A command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell.

Specifically, the term command is used in imperative computer languages. These languages are called this, because statements in these languages are usually written in a manner similar to the imperative mood used in many natural languages. If one views a statement in an imperative language as being like a sentence in a natural language, then a command is generally like a verb in such a language.

Many programs allow specially formatted arguments, known as flags, which modify the default behaviour of the command, while further arguments describe what the command acts on. Comparing to a natural language: the flags are adverbs, whilst the other arguments are objects.

More links:

10688 questions
3
votes
3 answers

Unix bash error - binary operator expected

So below is the code i have in my bash script. I'm getting an error saying binary operator expected when i give the command 2 arguments (doesnt give error when i give 1 argument). It does change the file permissions when i give 2 arguments because i…
pogba123
  • 79
  • 1
  • 3
  • 9
3
votes
2 answers

Input a text file through command line in java

I am trying to write a program that inputs a text file through the command line and then prints out the number of words in the text file. I've spent around 5 hours on this already. I'm taking an intro class using java. Here is my code: import…
presence
  • 61
  • 3
  • 8
3
votes
2 answers

How Timer command works in HEXCHAT

there is a command that I can't use... anyone knows the correct syntax? Usage: TIMER [-refnum < num >] [-repeat < num >] < seconds> < command> TIMER [-quiet] -delete < num>
behzad
  • 801
  • 3
  • 15
  • 33
3
votes
1 answer

Command Binding not working when the host control is added programatically in wpf

This is weird. I have a UserControl (MyControl) with a button inside. I have added a command to this button whose command target is another user control which is again added to the same window. When I add the UserControl statically in xaml to the…
sudarsanyes
  • 3,156
  • 8
  • 42
  • 52
3
votes
2 answers

test class is not specified or invalid

I need to run a couple of tests on a console command, each of which will have a small change to the database before the test is run. I've structured this as follows: class ActionRemindCommandEmail extends KernelTestCase { private…
jdog
  • 2,465
  • 6
  • 40
  • 74
3
votes
2 answers

How do I execute a command using a local program in OCaml?

So the default way to execute commands in OCaml is Sys.command s where s is the command in this case, but I come across an issue when the command involves a local program. For example, if I have an executable named prog I compiled from an ocaml…
podington
  • 179
  • 1
  • 8
3
votes
2 answers

Defining the order of the arguments with argparse - Python

I have the following command line tool: import argparse parser = argparse.ArgumentParser(description = "A cool application.") parser.add_argument('positional') parser.add_argument('--optional1') parser.add_argument('--optional2') args =…
cybertextron
  • 10,547
  • 28
  • 104
  • 208
3
votes
1 answer

What object i should have in command?

I writing system following hexagonal architecture. I have asynchronous commands and synch query objects split in UseCase. My src folder look…
timiTao
  • 1,417
  • 3
  • 20
  • 34
3
votes
1 answer

How do I merge the audited fpr file with the newly scanned fpr file using the command line?

I want to merge an audited fortify .fpr file with the newly scanned .fpr file so that all audits and comments get reflected even in the new file. How do I merge the files using command line? Thanks in advance.
3
votes
1 answer

How do i do fix the %%i was unexpected at this time?

i'm trying to use batch script code for emobase configuration using the commands cd "cd\Users\Admin\Desktop\recording\angry" for %%i in (*) do "C:\Users\Admin\Desktop\openSMILE\openSMILE-2.1.0\bin\Win32\SMILExtract_Release.exe" -c…
Sazer Job
  • 33
  • 4
3
votes
1 answer

Set was unexpected at this time? (batch)

At first, it said "set was unexpected at this time" and now when I run it, it just closes. This is in batch. Have any ideas? Here's the code: :waves if %wave1%==1 set /a wave1=ACTIVATED if %wave1%==0 set /a wave1=DEACTIVATED if %wave2%==1 set /a…
King Mat
  • 91
  • 1
  • 6
3
votes
0 answers

How to run Swagger command in CLI

I am following one article related to a Swagger. https://github.com/swagger-api/swagger-node Section: Your swagger API in five steps I install Swagger with npm using -g command. However, I am not able to fire command related to Swagger. It shows me…
Alpesh Prajapati
  • 1,593
  • 2
  • 18
  • 38
3
votes
3 answers

sed command does not work when a comma is present

New to sed, so please bear with me... I have a php file which contains the following line: define('TARGET_A','044'); Id like to find that line and replace it with the following using sed: define('TARGET_K','076'); I have tried: $ sed -i…
dsrupt
  • 55
  • 7
3
votes
3 answers

How to use both Command and EventTrigger in DataTemplate Button?

I have a Button in a DataTemplate that is bound to a Command in my ViewModel. The button also has an EventTrigger that kicks off a Storyboard that hides the edit controls (of which the button is a part.) The Storyboard works fine if I pick up the…
Bill Lefler
  • 127
  • 2
  • 10
3
votes
1 answer

How to use scp with xargs?

I am trying to move very big file from one host to another host. Also the file names are too large so I have to use xargs. Also all the sub directories need to be copied also I am using the below command in the source host current directory find .…
Anirban Nag 'tintinmj'
  • 5,572
  • 6
  • 39
  • 59