Questions tagged [command-line]
An interface for interacting with a computer using typed commands in a text-oriented environment, as opposed to a graphical user interface (GUI).
13,309 questions
7
votes
1
answer
544
views
What Linux shell command can I use to display content of a file in which another process is writing?
I developed a process named X0 that continually appends some lines to a CSV file to register some electrical data as voltage or power.
This process run a python program and is started using following ...
0
votes
1
answer
36
views
Windows batch files: popd returns 0 error code but still triggers || conditional execution
I am seeing unexpected behavior from popd command where it runs fine, return 0 errorlevel, but then triggers conditional execution specified by || conditional execution operator. Here is a sample ...
4
votes
2
answers
282
views
How can I reload a command prompt after modifying an environment variable in Windows 11?
I'm working with a Windows 11 command prompt. While doing that, I need to define or modify an environment variable.
In order for that environment variable to be taken into account, I need to restart ...
5
votes
2
answers
645
views
Why am I getting a “(standard_in) 1: illegal character: ^M” with 'bc' in Cygwin on Windows?
I've got the bc command installed in Windows via Cygwin.
I try to use noninteractive bc mode via Command Prompt (not via a Cygwin prompt).
I got an error:
C:\Users\Peter>echo 1+1 | bc
(standard_in) ...
0
votes
0
answers
15
views
Creating clickable link to text file in Powershell [migrated]
I'd like to create a hyperlink to a text file in a Powershell script that'll be run in Windows terminal. I've made it work by hardcoding the link, ex. file://c:/textfile.txt but I'd like to compile ...
1
vote
0
answers
48
views
Is there a way to retrieve the last error code of an application?
I have an application, written in C++, containing the following source code:
sc = GetLastError();
...
sc = ERROR_INVALID_DATA;
In the event log, I see a log, corresponding with the ERROR_INVALID_DATA ...
2
votes
1
answer
392
views
How can I set the default Python version that gets launched when typing python3 (On Windows 11)?
Overview
My exact goal is to set my preferred version of python as the default when I type python3 into a command prompt or powershell prompt. I've tried everything but can't figure it out.
I have the ...
0
votes
0
answers
39
views
How to receive a argument in CMD script when users keys name of CMD file plus parameter? [duplicate]
I want the user to be able to key the name of the CMD script, and an optional parameter to be passed to the CMD script. Would that just be script-name parameter? Or ....
In the CMD script, how do I ...
0
votes
1
answer
50
views
CrystalDiskMark ver8/9 Benchmark Command Line
I would like to automate the benchmark execution and result retrieval for CrystalDiskMark ver8/9 through command line. The official website FAQ session stated that command-line option feature is ...
-5
votes
1
answer
71
views
How do I do copy Windows installation files in CMD? After I have listed my source, and it's saying C:\ [closed]
How do I do copy Windows installation files in CMD? After I have listed my source, and it's saying C:...
x:\Sources>c:
C:\>_
Then, what do I enter there?
0
votes
2
answers
176
views
Powershell opens briefly, then disappears. It had been working fine
A newish (Sept) install of win10 Pro 22H2 (OS Build 19045.6466) on new MSI mobo w/ AMD Ryzen 5 5500GT
The native Powershell was working fine for awhile. After a period of time when I didn't use it, ...
0
votes
2
answers
63
views
Translate testdisk CHS notations to bytes?
Here is an example partition shown on my disk.
Partition
Start
End
Size in sector
P Linux
60801 47 47
60801 80 15
2048
How do I calculate size in bytes from Start and End?
How do I calculate size in ...
0
votes
0
answers
36
views
Why is my macOS Terminal is no longer recognising most common commands? [duplicate]
Feeling way out of my depth with this one. I have been trying to install Tartube on my MacOS via terminal. This involved installing Homebrew, Python 3, Gtk 3, Python Requests Module, Youtube-dl, the ...
2
votes
2
answers
114
views
How can I use Awk to match multiple lines and then concatenate other fields?
How can I use Awk to match multiple lines and then concatenate other fields?
1 Gen 1 75
1 Gen 1:1 10
1 Gen 1:1 11
2 Exo 1:1-2 13
2 Exo 1:1-2 14
3 Num 1:1-4 ...
0
votes
1
answer
158
views
Why doesn’t my sed command work properly? It replaces old values with errors
The sed command that I use is:
sed -i 's,oldvalue,newvalue,g' *.txt
When I use the above sed command with each of the below examples (1, 2, and 3), the results contain errors.
Example 1
Old value:
...