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

Questions tagged [shell]

The term 'shell' refers to a general class of text-based interactive command interpreters most often associated with the Unix & Linux operating systems. For questions about shell scripting, please use a more specific tag such as 'bash', 'powershell' or 'ksh'. Without a specific tag, a portable (POSIX-compliant) solution should be assumed, though using 'posix' in addition or 'sh' instead is preferable.

shell
0 votes
1 answer
10 views

Is there a way to run Chrome browser on the command line so it blocks instead of being spawned?

for tessting a web app with a script I have launch_test() { spawn_local_test_http_server(port) I want -> run_browser_with_url(where server is) such that it will block until the user ...
peterk's user avatar
  • 5,334
0 votes
1 answer
15 views

Linux shell - Output ping to file and only keep last X lines

I want to write a shell-Script for my Raspberry Pi to permanently ping a specific host but only keep the last 20 results in a text file. So my idea was to redirect the ping output to a text file and ...
GuidoT's user avatar
  • 282
0 votes
0 answers
24 views

Github CLI: repo counts without details

The --limit option of gh has an upper value limit. This is set to reasonable values, and for understandable reasons; as discussed here. It can be convenient to format the output of gh as JSON, and ...
user2023370's user avatar
  • 10.9k
1 vote
1 answer
21 views

Runing shell script with python temporary environment variables

I am trying to find a way to run a python script with temporary env variables underground. I am using the following script to illustrate my approach, but it does not work. example.py import os import ...
Ivan's user avatar
  • 133
0 votes
0 answers
36 views

Shell script to add and commit in batch of files at a time [closed]

I will like to fix the issue where "git add" fails when a space is detected in the path file name. e.g source/code/data form/documents.txt. How can I update this script to allow file names ...
Ctan Li's user avatar
  • 187
0 votes
1 answer
24 views

Configuring permissions to invoke tc qdisc shell commands requiring CAP_NET_ADMIN in C/C++ program

I have a C++ program that intends to set queuing disciplines by invoking (iproute2) tc shell commands. Example code: #include <iostream> #include <cstdlib> int main() { const char* ...
Mitja Rislakki's user avatar
-2 votes
0 answers
16 views

New relic for tomcat based application [closed]

I have one application and i want to integrate new relic java agent into that application ,i successfully injected new relic jfr into java based applications but for tomcat based application which ...
jitendra varshney's user avatar
0 votes
1 answer
33 views

Extra padding in shell title view (IOS)

When using shell title view, an extra padding space is coming below title view only in IOS. enter image description here Code for TitleView <Shell.TitleView> <Grid ColumnDefinitions=&...
Meghna Singh's user avatar
-1 votes
0 answers
12 views

Shell Script not able to access SSH_AUTH_SOCK environment variable

I am trying to build a docker image through a script, this script or any other script which I have tested with is not able to access SSH_AUTH_SOCK variable, when i echo in terminal it works, but when ...
arpit pundir's user avatar
-2 votes
4 answers
98 views

How to append some static content within a single cell of an existing CSV file

Let's assume I need to append the below content within the first cell (not be row by row) of the existing CSV file which has details of the customer. How can I achieve it? Content to be added: "...
Loganayaki mahalingam's user avatar
-1 votes
1 answer
26 views

Calling `subprocess` in Python notebook has different `$PATH` than `!` shell

I am developing a wrapper class interactively in an IPython notebook. This wrapper class invokes a command line program written in java, and thus I need access to the same version of the java runtime ...
asimov's user avatar
  • 39
1 vote
0 answers
69 views

exit status of if statement in bash when condition is false

If I run help if in bash then it tells me that the exit status is "the status of the last command executed". Let's try it: if false; then echo we never get here fi echo $? The last ...
Mark VY's user avatar
  • 1,639
0 votes
1 answer
21 views

Copy only *.log file [duplicate]

I have the below .ksh file. I just want to copy *.log file from parent_dir to target_dir while maintaining the folder structure and time stamp. The below ksh copies EVERYTHING from source/parent_dir. ...
Arpit's user avatar
  • 333
2 votes
3 answers
70 views

Using sed to remove differences in two arrays (updated ssh keys)

My aim is to updated automate the update of ssh keys in the authorized_keys file. Due to restrictions i am unable to use ansible which would have been a lot simpler. Steps: read keys from the file ...
Drey''s user avatar
  • 25
0 votes
0 answers
12 views

A android shell script for converting Bluetooth gamepad input to mouse click

Is there any gamepad mapping app which converts gamepad input to mouse click events, not touch events! If not, can someone help me writing a script in shell which I can execute through adb, so that I ...
Ryan Tariq's user avatar

15 30 50 per page
1
2 3 4 5
6191