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
2 answers

bash script command not found - command correctly implemented

I wrote a bash script and i got these message: /home/myname/documents/myscripts/run_tearingmode.sh: line 44: mpirun2: command not found: Here the relevant part of the script if [[ "$run_jobs" == "y" ]] then printf "The jobs run one after the…
user2867054
  • 59
  • 1
  • 7
3
votes
2 answers

What does the `as` command do in Python 3.x?

I've seen it many times but never understood what the as command does in Python 3.x. Can you explain it in plain English?
user2820691
3
votes
6 answers

how to delete a file started with '-'

How can I delete a file whose name started with '-'? For example, if I have a file named -a and I delete it with: rm -a I will get: rm: invalid option -- 'a' Try 'rm --help' for more information. So how can I do it?
Given92
  • 101
  • 2
  • 8
3
votes
1 answer

Stop or restart beanstalkd manually on command line

Beanstalkd is running on my Ubuntu VPS. I don't know how to stop or shut down the beandstalkd server. I want to stop the server manually on the command line. I've found monitoring tools and a configurations script, but no commands for the…
erwineberhard
  • 309
  • 4
  • 17
3
votes
1 answer

Smart Way to Handle Voice Commands in Code to Action a Command

Rather than using Switch/Case or IF Boolean checks that can get very long and awfully tedious, I wonder if a better way can be sought for handling and processing Commands. E.G: if(settings.getName == Command) { Speak("I am here"); } if("Get News…
Rusty Nail
  • 2,692
  • 3
  • 34
  • 55
3
votes
1 answer

VS2012 : where is custom toolbar command SyncWithActiveDocument?

In Visual Studio 2012, you can create customized toolbars and edit their contents (usually button shortcuts to some IDE commands). I would like to add the SolutionExplorer.SyncWithActiveDocument command to one of my toolbars, but cannot find it in…
wip
  • 2,313
  • 5
  • 31
  • 47
3
votes
1 answer

Shortcut to running Mac Terminal commands

Ok... I've been searching for an answer to this for a while and can't seem to find any good examples, so I thought I'd break down and ask. How can I create a shell file (.command) in OSX that I can just double-click on which: Opens a new Terminal…
user2454182
3
votes
2 answers

How can I remove quotes from forfiles variable fname

Can anyone explain me how to do this? Problem is @fname contains quotes so concatting %source% and @fname gives an error... forfiles /P "%source%" /M %file%.* /D -1 /C "cmd /c if exists %source%\@fname.pdf del @path"
grmbl
  • 2,514
  • 4
  • 29
  • 54
3
votes
1 answer

Passing commands to a running process

After looking for a couple of hours, I decided it's time to ask for some help. I have a local server of an online game, which has its own command line where the admin can execute different commands, like /kickuid x (which kicks the user with the…
Chris
  • 31
  • 2
3
votes
8 answers

Unix wizardry to get the binary content of a file as text?

I'm looking for an easy way to convert a simple binary file into a text-representation of its binary, where encoding doesn't matter. I know that the programmatic solution is straightforward, but I feel that there must be some arcane string of unix…
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
3
votes
3 answers

MVVM questions on Josh Smith's Sample Application

I have been working through Josh Smith's article on MVVM at http://msdn.microsoft.com/en-us/magazine/dd419663.aspx. Each section makes sense to me but I am having a hard time putting it all together as a coherent unit mentally. I have 2 questions…
Mike B
  • 2,592
  • 3
  • 33
  • 46
3
votes
0 answers

How to set permission mode for full tree when creating directory tree using install command?

When creating a directory tree in one shot like below, the directories dir1 and dir2 are getting the default owner/permissions(chmod) and only the end directory(ie; dir3) is created with the required owner/permission. I could not figure out from man…
unni
  • 133
  • 1
  • 5
3
votes
1 answer

How to Attach Command to Event in WPF Using MVVM - DataGrid Selection Changed to Update the RowCount Displayed in a TextBlock

In order to attempt to get around the problem I outline in Binding Selected RowCount to TextBlock not Firing OnPropertyChanged after DataGrid Scroll; namely updating a TextBlock with the currently selected row count of a DataGrid when it scrolls. I…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
3
votes
1 answer

How to copy certain files from the same directory to another dirctory in Windows Command Prompt?

I am fairly new here and didn't use a lot of Windows Command Prompt's advanced function. So bear with me... Currently, I have a folder containing a lot of image files. The example file name is like 20130611.084021.c123.tif, which means…
Nan An
  • 633
  • 3
  • 7
  • 11
3
votes
2 answers

"RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n... Operation could not be completed (error 0x0000000c)

I stored my printer settings in a .dat file with this command: RUNDLL32 PRINTUI.DLL,PrintUIEntry /Ss /n "SATO CG408" /a "c:\INI\small-tag.dat I'm then trying to restore the printer setting in VB.net with this command (passing in my ini…
user2531854
  • 856
  • 3
  • 13
  • 32