Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged BASH

0 votes
665 views
1 answer
    Both about -a and -e options in Bash documentation is said: -a file True if file exists. -e file ... result when used inside single brackets? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
708 views
1 answer
    I would like to define a simple abbreviation of a call to gs (ghostscript) via a shell script. The first ... or myscript *.pdf outfile.pdf. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
623 views
1 answer
    I know that bash -x script.sh will execute script printing each line before actual execution. How to make ... Python interpreters do the same? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
726 views
1 answer
    What is the best way to choose a random file from a directory in a shell script? Here is my solution in Bash ... GNU installed but not Perl 5. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I'm trying to use a variable in a grep regex. I'll just post an example of the failure and maybe someone can ... it. $ echo $string test this $ See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
665 views
1 answer
    I want to write in a bash script a piece of code that checks if a program is already running. I have the ... Is there any solution to that? Thx See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
795 views
1 answer
    I have the following. A Java process writing logs to the stdout A shell script starting the Java process Another shell ... ' exit 0 fi done } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
959 views
1 answer
    How can I make this work? curl -XPOST 'http://localhost:9290/location/place' -d '{"geoloc": {"lat": "38. ... u0027 (the unicode ') I'm stuck See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
764 views
1 answer
    I'm trying to set up a simple systemd timer to run a bash script every day at midnight. systemctl --user ... full script if that's helpful. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
746 views
1 answer
    I want to make clear when does pipe | or redirection < > takes precedence in a command? This is my thought but need ... and a > with a | ??? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
677 views
1 answer
    I was using SLURM to use some computing cluster and it had the -ntasks or -n. I have obviously read the ... test it out in the cluster. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
689 views
1 answer
    I have two users in Fedora: Wani root (quite obvious!) My contents of .bashrc of user Wani are: # .bashrc ... not get copied to Wani from root? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
862 views
1 answer
    I know you can do it with a find, but is there a way to send the output of ls to mv in the unix command line? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
910 views
1 answer
    At work we are several developers and don't have a code style guide, and some developers indent with tabs, and ... instead of bash. Any ideas? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
603 views
1 answer
    Bash auto completion appends a / at the end of a directory name. How I can strip this off from a ... /$date$target.tar.gz $path } backup See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
805 views
1 answer
    I suppose I could compare the number of files in the source directory to the number of files in the target ... the former is not possible). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
734 views
1 answer
    I need to find empty directories for a given list of directories. Some directories have directories inside it. If ... >C1,C2 this is empty See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
661 views
1 answer
    I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar ... subdirectories, but not go further. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
562 views
1 answer
    I have a directory: /home/user/ How can I list every file in this directory (including those in sub ... that they were last modified? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    Consider the curl command below, is it possible to allow newline in JSON (without the minify) and execute ... sure why problem happen recently. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
794 views
1 answer
    For example, given: USCAGoleta9311734.5021-120.1287855805 I want to extract just: US See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
935 views
1 answer
    How do I enter an exclamation point into a Git commit message from the command line? It is possible to escape the ... commit -am "Nailed it!" See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
763 views
1 answer
    I have done this: $ z() { echo 'hello world'; } How do I get rid of it? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
843 views
1 answer
    I'd like to find out if a Docker image with a specific tag exists locally. I'm fine by using a bash ... a4fbaad9f996 11 weeks ago 131.5 MB See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
882 views
1 answer
    My client app that is deployed on Heroku allows the user to upload images onto Heroku. I wanted to test out a ... app. What am I doing wrong? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
757 views
1 answer
    I have written a query: function print_ui_hosts { local sql = "select ........." print_sql "$ sql" } ... I split a string into multiple lines? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
709 views
1 answer
    I'd like to use the time command in a bash script to calculate the elapsed time of the script and write ... into something easier to process. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
748 views
1 answer
    Is there a command to retrieve the absolute path given the relative path? For example I want $line to contain the ... line; do echo $line done See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...