Questions tagged [command-line]

A command line is a string given to a command interpreter that tells it actions to take, such as running programs or copying files. The interpreter processes command lines with escapes and substitutions.

A command-line interface () is a mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks. This text-only interface contrasts with the use of a mouse pointer with a graphical user interface (GUI) to click on options, or menus on a text user interface (TUI) to select options.

This method of instructing a computer to perform a given task is referred to as entering a command. The system waits for the user to conclude the submitting of the text command by pressing the Enter key (a descendant of the carriage return key of a typewriter keyboard). A command-line interpreter then receives, parses, and executes the requested user command. The command-line interpreter may be run in a text terminal or in a terminal emulator window as a remote shell client such as .

Upon completion, the command usually returns output to the user in the form of text lines on the CLI.

Related tag:

See also: Wikipedia Command-line_interface.

23435 questions
14
votes
3 answers

Zsh array of strings in for loop

Am trying to print a bunch of strings in a script (in zsh) and it doesn't seem to work. The code would work if I place the array in a variable and use it instead. Any ideas why this doesn't work otherwise? for string in (some random strings to…
Jikku Jose
  • 18,306
  • 11
  • 41
  • 61
14
votes
5 answers

Changing to remove path from environment variable PATH

I'm trying to use a command line implementation to change the PATH environment variable to remove a path, so I don't have to manually remove it on a bunch of machines. I have found this, which I can't seem to get it to work: %Path:str1=str2% str1…
Bruce227
  • 893
  • 5
  • 14
  • 25
14
votes
3 answers

How do I write to command line from a WPF application?

Hi I know how to write to console but if I write to console in my program and call my program from the command line it won't display anything. How do I make it so that when I say Console.WriteLine or Console.Out.Writeline ir prints to the command…
ben
  • 155
  • 1
  • 1
  • 6
14
votes
1 answer

How do I change users in FileZilla?

I am using FileZilla to log in to an SFTP host with my credentials. However, I need to use an equivalent of sudo su - user (as used in linux) to change the user. There are no passwords set for this general user, and hence direct login is not…
user2967948
  • 529
  • 2
  • 8
  • 23
14
votes
4 answers

can a python script know that another instance of the same script is running... and then talk to it?

I'd like to prevent multiple instances of the same long-running python command-line script from running at the same time, and I'd like the new instance to be able to send data to the original instance before the new instance commits suicide. How…
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
14
votes
3 answers

How to convert a text file containing hexadecimal to binary file using linux commands?

I have hex code of a binary in text (string) format. How do I convert it to a binary file using linux commands like cat and echo ? I know command following command with create a binary test.bin. But what if this hexcode is in another .txt file ? How…
aMa
  • 629
  • 3
  • 10
  • 19
14
votes
2 answers

Compile IOS program from linux commandline

I want to compile my IOS appication from linux terminal(command line).... Is it possible to do so, if yes, then how?
saurabh
  • 259
  • 1
  • 3
  • 11
14
votes
3 answers

Cannot connect to python -m SimpleHTTPServer server

this this probably a very simple question, but I haven't been able to find an answer anywhere. On the online articles about it, they didn't show the exact process to share a directory using SimpleHTTPServer. I've run the command successfully and…
Student Loans
  • 303
  • 1
  • 4
  • 10
14
votes
2 answers

How to run Go(lang) code directly from terminal/command line?

I want to run simple go code directly from terminal/command line. For example: go run " package main func main() { println("hello") } " hello However golang allows code execution only from file. So maybe there are some ways how to emulate it? Like…
Timur Fayzrakhmanov
  • 17,967
  • 20
  • 64
  • 95
14
votes
3 answers

Charset conversion from XXX to utf-8, command line

I have a bunch of text files that are encoded in ISO-8851-2 (have some polish characters). Is there a command line tool for linux/mac that I could run from a shell script to convert this to a saner utf-8?
Marcin
  • 7,874
  • 7
  • 45
  • 49
14
votes
1 answer

-bash: !": event not found

How do I fix this bash terminal? Why would the '!' suddenly be a problem and the need for quotation marks are no longer seem to be necessary to produce the string. Did I break something? If so how do I reset it to factory setting? I'm sure it was…
Michel Frechette
  • 197
  • 1
  • 2
  • 8
14
votes
5 answers

Opening a file in a Metro app from command line

I need a way to open a file in a Metro app from command line. So far I've figured out how to start the app from command line without any third-party scripts explorer shell:AppsFolder\Microsoft.Reader_8wekyb3d8bbwe!Microsoft.Reader but I haven't…
14
votes
1 answer

MySQL Import Database Schema

I'm having issues attempting to import a database of 195MB via the command line. mysql -u root -p [DB_NAME] C:\Users\user_name\Downloads\file.sql When I run this command all I receive from MySQL is a list of variables and options available. What am…
Richard Skinner
  • 738
  • 3
  • 10
  • 26
14
votes
4 answers

Command-line input causes SyntaxError

I have this code: # Compare phone number phone_pattern = '^\d{3} ?\d{3}-\d{4}$' phoneNumber = str(input("Please enter a phone number: ")) if re.search(phone_pattern, "258 494-3929"): print "Pattern matches" else: print "Pattern…
coson
  • 8,301
  • 15
  • 59
  • 84
14
votes
1 answer

Partition information from CMD

Is there any CMD command line that shows all partition letters. For example: C, D, E... Can that command also show all the partition's information? Free space, used space, total space?
gedO
  • 548
  • 2
  • 7
  • 24