Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

Command-line interface or command-line interpreter, a means of interacting with a computer by means of textual commands and short scripts.

0
votes
2answers
102 views

How to handle command line parameters

I am writing a gui that is supposed to replace a fairly large shellscript in order to make the usage easier for not-so-technical people. The script calls a certain program (saga_cmd) multiple times ...
1
vote
2answers
76 views

CLI tool with overloadded structure

I have a python CLI tool that my department uses to process some excel file aided by a yaml. I tried to diagram a basic work flow here: Step 1: User downloads a xlsx, puts it in a file, runs tool --...
4
votes
2answers
136 views

Grouping non-boolean command-line options

This is just a quick question about standard CLI-parsing design. Say we have: foo -abc for most CLI-parsers, a single - dash (as opposed to a double dash --) means you can group single letter ...
2
votes
5answers
242 views

How to pass command line parameters to various parts of program

Consider a large program with many different parts that have a single command line interface, as is the case with most applications. How best do I handle passing various command line parameters, that ...
4
votes
5answers
1k views

Positional arguments vs options in a command-line interface

Consider the following command-line program manage-id. It does these things: manage-id list (list all usernames and user-ids) manage-id show <username> (shows ...
15
votes
3answers
643 views

What is the right way to manage developer scripts?

Developers create scripts to help in their work. For example, to run Maven with certain parameters, to kill unneeded background tasks that crop up in development, or to connect to a certain server. ...
0
votes
1answer
73 views

Is there a normal way to program a CLI script that overrides default parameters in python

If I've got a script that uses a config file (or defaults to a generic config file) that calls another module which needs the config file passed to it as a parameter should I always File 1 (the ...
-5
votes
1answer
377 views

What parser algorithm is best suited for command line parsing?

I want to write my own command line library from scratch. What algorithm should I use in order to parse gnu style args like in getopt for example ? I mean what's the best way other than tokenizing and ...
1
vote
1answer
568 views

Command Line Interface MVC Architecture

I just learned about the MVC architecture. I was going back and working on a command line file transfer application I wrote, and I was curious, to what degree should command line interfaces follow the ...
-4
votes
4answers
241 views

What are good ways to parse a large amount of input for a C++ application [closed]

For small command line applications I can get away with simple command line input. ./test input.png output.png But for larger applications that requires a lot of input, simply using command line ...
-2
votes
1answer
137 views

What is the “Best Design” for implementing a Command Line which calls ReST API?

Basically I am calling a Server and expect a JSON response. The complication is when I need to pass the parameter which is in the form of JSON. The initial outcome of my thought process was to have a ...
3
votes
1answer
237 views

Name of notation used when documenting command line parameters

Often, command line parameters are documented using a vaguely EBNF-ish notation such as the following: The output of dir /? on Windows: DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D]...
3
votes
3answers
119 views

patterns for converting user command-line input into computer commands

The problem: 50 different commands which are typed into a command line for a program, lets say for telling a robot what to do. Some of the commands have user determined values such as travel north 5 (...
0
votes
1answer
57 views

For interaction by other programs: command line, sockets, or something else?

I'm beginning an open-source project for logging work hours. The intention is to build something similar to Git, where instead of pushing code you're pushing information about work hours and progress. ...
0
votes
2answers
139 views

Standard for implementing GUIs for command line utilities

I wrote a command-line utility and I want to develop a GUI for it. I saw that almost every tool on linux comes command-line, and it eventually has a GUI which interacts with the command line utility ...
-3
votes
1answer
105 views

What does set.seed(any number) command means? [duplicate]

I am currently studying R. While studying that I came across a command set.seed(any number) . After googling also I didn't understood much except that it has something to do with Random number ...
3
votes
2answers
149 views

Do there exist terms or classifications that describe the type of command line program you are writing?

Are there terms that are used to describe what kind of command line program you are programming based on how the program is designed to interact with the user? For example, I can write a program that ...
1
vote
1answer
396 views

Cross-platform unicode support for Python command line tool

I am working on a large command line tool, written for Python 2.6+ and supported for Windows, OS X and Linux. The target users are developers but it is also being auto-invoked by CI-systems etc. In ...
-5
votes
2answers
269 views

How is “CURSES” a pun for “cursor optimization”? [closed]

I've begun implementing a support library for curses in Python. Along the way, I became curious why the project was called "curses" to begin with. According to one NCURSES documentation, the name is ...
-1
votes
1answer
156 views

Is it safe to execute the “regedit” command on Windows? [closed]

I'm writing a Java application, I need to create a URI Scheme. I've seen a library creating a URI Scheme using the "regedit" command on Windows. Is it safe to execute "regedit" for this task? Is ...
3
votes
2answers
6k views

Should the main method be separate in a separate class? [closed]

In Java main methods often do little more than parsing the command line arguments and initializing an object that then takes over, for example: public class FooServer { // ... public static ...
4
votes
2answers
119 views

Should program arguments have mixed interpretations?

I'm developing a command-line tool that has many user options. Some of the options are lists of values. I'd like the program to be able to parse these listed options directly from the command line, ...
0
votes
2answers
196 views

Is renaming an 'alias' for moving?

Is it true to say (on Windows and Unix\Linux\OS X) that renaming a file or directory is just an alias for moving? e.g. Are there any side effects to either which are not present on the other? Does '...
0
votes
1answer
125 views

Unix way of filtering/mapping/mapcatting records via the pipeline?

At home I use Linux and have for more than a decade. At work we use Windows and so I find PowerShell more familiar. I am a Linux/Unix fanboy at heart, but I've had greater success grokking the ...
1
vote
1answer
76 views

Why don't terminals support standard keyboard shortcuts? [closed]

On OS X you can use cmd+left/right to jump to the beginning/end of the line, or option+left/right to jump word by word. In just about every application. But not in the Terminal. Nor iTerm. You have ...
5
votes
2answers
1k views

can a closed source commercial software make system(3) calls to GPL applications (not libraries)?

The closed source commercial software (CSCS), will just make system(3) calls to GPL applications. The user machine will run CSCS and it will call these GPL applications, in realtime, in the very same ...
7
votes
4answers
1k views

Is it allowed to embed an LGPL command-line tool?

I want to sell a closed-application that depends upon a certain command line tool. Am I allowed to distribute my software including this command line tool? For example, as a separate binary ...
-1
votes
1answer
94 views

“Grep” that highlights instead of filter [closed]

I was wondering if there is a program in the common unix toolset such as grep that instead of filtering the lines that contain a string, simply outputs the same input but highlighting or coloring the ...
3
votes
2answers
2k views

OOP CLI menu structure organization?

This problem has kept me from pursuing a project I'm working on because it influences the entire structure of the application. This question has been briefly touched on here, but I feel that it wasn't ...
-1
votes
3answers
149 views

Usage of the argv[0]

Lately I've discovered that the latex and pdftex (with some other one) binaries in Ubuntu are the same: lrwxrwxrwx 1 root root 6 лип 29 18:03 latex -> pdftex* lrwxrwxrwx 1 root root ...
4
votes
2answers
163 views

Factors for choosing between using a wrapper library or issuing command line process from my web application

I have a Java web application that makes use of certain libraries for example: Ghost Script for converting PDFs to TIFFs and Tesseract for OCR. There are java wrappers for both of these: Ghost4J and ...
1
vote
1answer
617 views

Add arguments to mysql in Django's “dbshell”

I'd like to add a couple of command-line arguments to my Django's ./manage.py dbshell command, and I can't figure out how. In specific I'd like to add -A to prevent MySQL from scanning every table ...
0
votes
1answer
110 views

How did the “abnormal” options in shell commands appear?

These options which obscure me are like ps aux, route -ee, gcc -fPIC xxx, find . -name xxx and so on. The examples above aren't comprehensive. I.e., I don't think that the argument handle ...
1
vote
1answer
134 views

How do programs generally get information from the OS?

In many languages there are libraries, either built into the language itself or built separately outside of the language, which allow information to be taken from the operating system at some level. ...
-1
votes
2answers
174 views

IS a command-line (Console) is important to learn for ASP.NET developer? [closed]

I saw many RoR developers use command line to interact with interfaces and to deploy their web applications. Is that necessary step to earn for asp.net developer?
2
votes
0answers
107 views

Simple avenues for dynamically building Windows executables

I'm trying to build a Firefox add-on which lets you create executable files which can be associated with a default program or added to the "Open With" list and possess its own icon. I was hoping to ...
1
vote
1answer
339 views

Where does the tradition of shell prompts in code snippets come from?

Most code samples I see that demonstrate shell code preface each command with $. Having a prefix makes sense, but I'm confused as to why $ is used in particular. Some other symbol, like !, that can be ...
14
votes
3answers
583 views

When is it appropriate to use colour in a command-line application?

Currently I have a command-line application in C called btcwatch. It has a -C option that it can receive as an argument that compares the current price of Bitcoin with a price that was stored ...
1
vote
2answers
195 views

Need a simple compact program to execute few commands

(On Windows 7 64 bit)... I am looking for a program, something similar to the default Windows Terminal, what I need it to do is: Load text from a given URL, split the code in two variables and then ...
0
votes
1answer
7k views

Creating java package on ubuntu? [closed]

I am new to java. Here I am trying to create java package. And try to compile it from another directory . But there is an error like bash: /home/gaurav/Desktop/package2/B.java: Permission denied Here ...
1
vote
4answers
723 views

Checking for minimum number of command-line arguments, but allowing help switch

I just ran into an odd scenario. I’m sure that I must have run into the same situation in the past and yet somehow not noticed it until now. I am writing a program that requires at least two command-...
18
votes
3answers
2k views

Where did the convention of naming command line arguments as 'argv' come from?

It seems like Python, PHP, and Ruby all use the name "argv" to refer to the list of command line arguments. Where does the name "argv" come from? Why not something like "args"? My guess is that it ...
0
votes
2answers
273 views

Parsing stdout with custom format or standard format?

To integrate with other executables, a executable may launch another executable and capture its output from stdout. But most programs writes the output message to stdout in custom format and usually ...
5
votes
2answers
4k views

Why do Windows commands allow `-` and `/` switches? [closed]

> shutdown /? > Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/f] The windows cmd.exe command shutdown only documents forward slash / switches, but it accepts ...
7
votes
3answers
22k views

What are the benefits of using the command line for software development? [closed]

What benefits are gained from using the command line for software development over using an alternative GUI? Is the command line faster for certain tasks? Are certain tools only available via the ...
-1
votes
2answers
2k views

What is the relationship between the command line, the OS and the microprocessor? [closed]

I'm not totally clear on how using the command line differs from working through the OS' interface using an editor for example. Obviously the UI is different but I want to understand how the command ...
92
votes
17answers
24k views

Is it a good idea to design an architecture thinking that the User Interface classes can be replaced by a command line interface?

In Code Complete page 25, it's said that it's a good idea to be able to easily replace the regular user interface classes by a command line one. Knowing its advantages for testing, what about the ...
3
votes
2answers
284 views

Should program behavior be modified using a config file or environmental variables?

I'm referring to *nix command line applications primarily, where you want to permanently modify the behavior from defaults. Environmental variables are easily understood and implemented, usually ...
6
votes
1answer
1k views

Command line merge conflict tools

I sometimes prefer to work in a terminal. I use git, and sometimes have merge conflicts. Are there any merge-conflict-resolution tools that work in a command-line only environment?
0
votes
8answers
1k views

Input to program without command-line arguments

Let's assume that there are no command-line arguments. How do you pass input data to a program? I'm thinking you'd write the input to a file with a specific name, such that the program knows to open ...