Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-2 votes
0 answers
37 views

(SOLVED) 'realpath' works from bash but not in desktop file [duplicate]

I have a CLI program I'd like to call with different parameters from .desktop files. (The command is rtl_acars_ng which monitors certain aeronautical frequencies for messages). So, executing from the ...
jcoppens's user avatar
  • 5,416
0 votes
1 answer
56 views

bash script - check number of input arguments based on one input argument value

I have to create a bash script for which i need to give input arguments based on action type: insert/update. In case of insert the bash script will need 3 input arguments but in case of update are ...
Mathew Linton's user avatar
0 votes
1 answer
35 views

Extract Variable Name for Unset Script

I have a .env file that contains information, to include environment variables. For example: # comment <mini script> export NAME="John Doe" export LOCATION="US" export ...
w113msh's user avatar
0 votes
2 answers
77 views

How to change path to the current directory in bash

I'm trying to customize my bash prompt and here's what looks perfect for me: PS1='\n\[\033[32m\]\h \[\033[33m\]\w\[\033[36m\]`__git_ps1`\[\033[0m\]\n' I want the current path to start only from ...
Nabil Yasser's user avatar
0 votes
1 answer
52 views

Is there a way to force a command's argument to read from stdin instead of straight from the command line? [duplicate]

I have a python script I'm running that I don't have the ability to change. Here's how I tried running it: python my_script.py --username <username> --password - Just to see if python would ...
Tyler Cheek's user avatar
3 votes
1 answer
46 views

Why does MySQL print "\\." instead of "\." on the command line?

I just want to select backslash-period "(\.)". In the MySQL client when I run mysql> select '\\.'; +----+ | \. | +----+ That is the outcome I want, but when I create a file name reverse....
Umut TEKİN's user avatar
0 votes
0 answers
32 views

Error: No Module Named 'example' When Executing a Jupyter Notebook from the Command Line with --ExecutePreprocessor.kernel_name

I am creating a bash command that will allow me to execute a jupyter notebook from the command line. Regardless of which import library I reference first, I get the error "No Module Named '...
J-snow's user avatar
  • 61
0 votes
1 answer
38 views

Why does command substitution work in these ways?

In my .bashrc file I have the following: export USER_HOME1='/home/$(id -nu)/' export USER_HOME2='/home/'$(id -nu)'/' export USER_HOME3="/home/$(id -nu)/" export USER_HOME4="/home/\$(id ...
tangjm's user avatar
  • 3
0 votes
1 answer
30 views

Copy values from XML element to create a new element with combined new value

I have this XML with multiple products and I want to add a new element with the values of other elements. I want to add a new element to each titled . This should include the values of ProductOption, ...
Riots's user avatar
  • 67
0 votes
0 answers
23 views

How to print the 1st line of a command’s output to screen, then sort the rest on col 6 and print that to screen? [duplicate]

Using the Linux command line, I would like to: — print the first line (from a command’s output) to screen — then sort the rest of the output by column 6, and print that to the screen too I’m sure ...
Old Uncle Ho's user avatar
1 vote
2 answers
97 views

Map custom and arbitrary functions with sed or awk

I'm trying to use commands sed or awk, together with arbitrary functions (or commands) defined, for example, as Bash scripts. For example, the following Bash script prepend_largest_prime.sh accepts a ...
gambarimas87's user avatar
-2 votes
2 answers
78 views

How to bring a job to foreground and then disable job control in bash? [closed]

I have a program running in a terminal window. I wish to disable the Ctrl+Z shortcut from suspending the process. After pressing Ctrl+Z, the command fg && set +m unfortunately disables job ...
SeparatedScheme's user avatar
-1 votes
3 answers
38 views

reformat short per-line data into a(n indexed) tabular layout to fill my terminal

I have a text file containing a small piece of data on each line: Maybe it's a word, or a single number. For simplicity let's assume there are no empty lines and no headers within that file. For ...
einpoklum's user avatar
  • 127k
0 votes
2 answers
79 views

How to glob all files with an extension in a directory and its subdirectories?

This feels like it must have an obvious answer, but I haven't yet found one. Consider this file structure: A.tsx B.tsx dist/C.tsx dist/D.tsx src/E.tsx src/F.tsx src/G.js src/component/H.tsx src/...
RobertAKARobin's user avatar
0 votes
1 answer
89 views

Renaming file extension after uploading to a remote server in WinSCP in batch file

I have a script that uploads files to a remote server using WinSCP. The files are processed and deleted by the receiver on the remote server. I would like to upload only new files being written to the ...
Spike's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
147