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

How can I debug POST requests with python's BaseHTTPServer / SimpleHTTPServer?

I found a script on this site for running a simple server via the command line with python. I added some print lines in because I'd like to print out the GET and POST parameters via the command line for requests, but I can't seem to get them to show…
cwd
  • 53,018
  • 53
  • 161
  • 198
14
votes
7 answers

How do I use afconvert to convert all the files in a directory from wav to caf?

I have a directory with about 50 wav files that I need to convert to caf, because AudioServicesCreateSystemSoundID() returns an error for some of them (but not all). Here's an example of the command I've used successfully for a single…
Elliot
  • 6,086
  • 11
  • 45
  • 57
14
votes
4 answers

Create PNG/JPG file with commandline on Mac

is there a command to create a simple PNG/JPG picture file, can be run in terminal/script command on Mac? For now, I'm going to create a simple one color PNG picture file, with parameter to specify wide and length. if it can put text on it, is much…
user1683774
  • 155
  • 1
  • 2
  • 6
14
votes
9 answers

SAS Display Manager commands

The SAS display manager is a comamnd line interface to the SAS system, which remains in Base SAS as a legacy facility. However the online documentation on how to use this facility is sparse at best, and google searches are less than fruitful. A…
Allan Bowe
  • 12,306
  • 19
  • 75
  • 124
14
votes
4 answers

boost::program_options : iterating over and printing all options

I have recently started to use boost::program_options and found it to be highly convenient. That said, there is one thing missing that I was unable to code myself in a good way: I would like to iterate over all options that have been collected in a…
shiin
  • 462
  • 6
  • 17
14
votes
4 answers

How to extract the first x-megabyte from a large file in unix/linux?

I have a large file which I am only interested in the first couple of megabytes in the head. How do I extract the first x-megabyte from a large file in unix/linux and put it into a seperate file? (I know the split command can split files into many…
umps
  • 1,119
  • 4
  • 15
  • 25
14
votes
3 answers

URL encoding a string in bash script

I am writing a bash script in where I am trying to submit a post variable, however wget is treating it as multiple URLS I believe because it is not URLENCODED... here is my basic thought MESSAGE='I am trying to post this information' wget -O…
Greg Alexander
  • 1,192
  • 3
  • 12
  • 25
14
votes
4 answers

Running Scheme from the command line

How do you run Scheme programs from the terminal in linux(ubuntu)? Also how to accept arguments from the command-line in a Scheme program? Edit: Im using the DrScheme implementation.
Pranav
  • 3,340
  • 8
  • 35
  • 48
14
votes
1 answer

How do I set cURL to always use the -k option?

For some reason my version of darwin/bash/evn variables is not letting me co anything from the command line with https, I dunno why, but I have tried everything. But I have found that cURL (the mean reason this is a problem for) can take a -k option…
James Vince
  • 1,269
  • 3
  • 10
  • 12
14
votes
2 answers

Explain this duplicate line removing, order retaining, one-line AWK command

I learned a really handy way to remove duplicate lines retaining the order from Remove duplicates without sorting file - BASH. Say, if you have the following file, $cat file a a b b a c you can use the following to remove the duplicate lines: $awk…
Alby
  • 5,522
  • 7
  • 41
  • 51
14
votes
2 answers

ncurses multi colors on screen

I want to make a menu with ncurses.h and more than one color. I mean something like this: ┌────────────────────┐ │░░░░░░░░░░░░░░░░░░░░│ <- color 1 │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│ <- color 2 └────────────────────┘ But if I use init_pair(), attron()and…
qwertz
  • 14,614
  • 10
  • 34
  • 46
14
votes
4 answers

Printing an ASCII spinning "cursor" in the console

I have a Ruby script that does some long taking jobs. It is command-line only and I would like to show that the script is still running and not halted. I used to like the so called "spinning cursor" in the old days and I managed to reproduce it in…
peter
  • 41,770
  • 5
  • 64
  • 108
13
votes
7 answers

Can an executable .jar file be called without having to use its full path?

I have a .jar file that I would like to be able to call without having to use a full file path to its location. For example, if the .jar file is located at: /some/path/to/thearchive.jar I'd like to be able to run it with: java -jar…
Alan W. Smith
  • 24,647
  • 4
  • 70
  • 96
13
votes
2 answers

How to do Eclipse's "export jar" from the command line

In my workflow for creating a jar to distribute my code, I currently: right-click on my project in Eclipse select "Export" select "JAR file" uncheck the top-level files like .classpath, .project check only "export generated class files" click…
lacker
  • 5,470
  • 6
  • 36
  • 38
13
votes
3 answers

Retrieve lost file using Vi in MySQL

I would like to know how to retrieve a file using Vi in MySQL. I logged in using: mysql -uuser -p -hserver -A database Then I do: \e The editor opens and I type my query of 200 lines, then I :wq and \G (if I save the file it says: /tmp/sql9SbYQZ…
aki
  • 1,241
  • 2
  • 13
  • 43
1 2 3
99
100