shell Questions
1
I invoke Ruby from my shell script like this:
ruby -n -e "print if %r($fromre)...%r($tore)" "$@"
Since Ruby 2.6, I get the warning
warning: flip-flop is deprecated
So it seems that i have to b...
4
Solved
I am making a process monitoring application. Now my need is
To get process related data (pid, process name, cpu usage, memory usage and virtual memory usage) for all the running processes.
After...
2
Solved
I'm using OHMYZSH but I'm thinking about building a minimal configuration to Zsh.
So here's the problem. Ohmyzsh has special behaviour for completion. For example: if I'm in my Home Directory and t...
4
I am trying to display the git branch on prompt on Big Sur.
So I have created a script file to run for each new session .zshrc
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/nu...
3
Solved
I want to send "CTRL + W" to the Chrome for Android to close active tab. I tried lots of things but there is no success to achieve it from terminal. (If i connect a USB Keyboard with OTG, i can clo...
5
Solved
I am using sed command to insert an xml element into the existing xml file.
I have xml file as
<Students>
<student>
<name>john</>
<id>123</id>
</studen...
2
Solved
This error is showing after running this command: sudo systemctl status [email protected]
[email protected] - PostgreSQL Cluster 10-main
Loaded: loaded (/lib/systemd/system/[email p...
Interpose asked 1/12, 2020 at 14:34
3
Solved
After "upgrading" to Mavericks and Xcode 5, I have a variety of minor problems to deal with to make Xcode compile some of my older projects.
It appears that Xcode is passing a new argument to the ...
Izzard asked 4/2, 2014 at 2:43
3
Solved
I am seeking a terminal command to recursively go through folder structures and either delete .htaccess files with permission of 0444 and/or if possible to match the first line in the file for a sa...
2
I am trying to log the docker stats every minute to a csv file in S3 bucket. The below command is run on putty.
while true; do docker stats --no-stream | aws s3 cp - s3://username/dockerstats/`dat...
6
I am making a bash script and I have encountered a problem. So let's say I got this
function create_some_array(){
for i in 0 1 2 3 .. 10
do
a[i]=$i
done
}
create_some_array
echo ${a[*]}
Is ...
Orthicon asked 12/2, 2013 at 18:24
2
i'm using ADB with command
adb shell settings put global http_proxy <ip>:<port>
it's works very good .
but i can't login proxy if it had protected with username and password
please...
Expend asked 14/2, 2020 at 5:39
4
Solved
Ok so I am writing a shell script to delete a directory but only if there are no files inside.
what I want to do is have an if statement that will check if there are files in the directory and if ...
5
Trying to do:
help:
@echo "you must $(call red_text,clean)"
where red_text is defined as
red_text = $(shell tput setaf 1; echo -n "$1"; tput sgr0)
This prints "you must clean", where word "...
11
Solved
I'm not sure why but my Bash aliases don't seem to work. Here is my .bashrc file
# v 0.0.1 - 7/03/12
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into ...
4
Solved
I'm looking for some solutions to use ps auxf command to show all processes without kernel threads, or maybe anyone know any else program to filter that kernel process?
What I've tried and found:
...
Alleyne asked 22/1, 2018 at 11:17
5
Solved
I try to post a file with a filesize of 4GB to a REST API.
Instead of uploading a file with this size, cURL POSTs a file with Content-Length: 0.
curl -v -i -d @"/work/large.png" -H "Transfer-Enco...
4
Solved
I'm trying to strip the version out of a package name using only Bash. I have one solution but I don't think that's the best one available, so I'd like to know if there's a better way to do it. by ...
Pulmonary asked 24/5, 2010 at 17:44
6
Solved
I'm sure someone has already solved this problem: what is an easy and portable way to convert a hex color value (anything from 000000 to FFFFFF) to 3 decimal values from 0 to 255. (If you're not fa...
4
Solved
I am writing a bash script to redirect output from another command to the proper location. Basically, when the script is invoked from a shell/commandline I want to send the output to STDOUT. But, w...
Ferriage asked 23/11, 2010 at 22:55
4
I am trying to clone a git repository using command:
git clonerepo test_simrkaur
But getting this error:
[simrkaur@bhlinb40 Repos]$ git clonerepo test_simrkaur
Cloning into 'test_simrkaur'...
remo...
3
Solved
I have a question about parallel processing in shell scripting. I have a program my
Program, which I wish to run multiple times, in a loop within a loop. This program is basically this:
MYPATHDIR...
Christo asked 7/11, 2011 at 17:46
2
I am using GitBash and I am downloading a file greater than 10GB and it stopped halfway. I don't want to download the whole file again from start. How can I start the download from where it was sto...
3
Solved
I use ffmpeg to update metadata tags like this way:
ffmpeg -i "in.m4a" -acodec copy -metadata artist="artist text"
-metadata comment="comment text" "out.m4a"
Well, "artist text" and "comment tex...
8
Solved
I have pattern like below
hi
hello
hallo
greetings
salutations
no more hello for you
I am trying to replace all newlines with tab using the following command
sed -e "s_/\n_/\t_g"
but it's not...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.