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
1.8k views
1 answer
    I want to design a shell script as a wrapper for a couple of scripts. I would like to specify ... remaining parameters to underlying script? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    Is it possible to use getopts to process multiple options together? For example, myscript -iR or myscript -irv. ... didn't get any answers. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I like to log a programs output 'on demand'. Eg. the output is logged to the terminal, but another process can ... read back. How to do that? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I want to get a list of files and then read the results into an array where each array element corresponds to a file name. Is this possible? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    I want to remove test.extra from all of my file names in current directory for filename in *.fasta;do echo ... to be sure it list correctly. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    Let's say I have the following string: something1: +12.0 (some unnecessary trailing data (this must go)) something2: +15 ... +9.0,+13.5 in bash? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    Can someone help me to convert a hexadecimal number to decimal number in a shell script? E.g., I want to ... expected (error token is "-") See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    grep -i -A 5 -B 5 'db_pd.Clients' eightygigsfile.sql This has been running for an hour on a fairly powerful ... grep is grabbing up to 93% CPU See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    How do I kill the last spawned background task in linux? Example: doSomething doAnotherThing doB & doC doD #kill doB ???? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I know that Esc + . gives you the last argument of the last command. But I'm interested in first argument ... by continuously pressing Esc + .? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I've renamed some files in a fairly large project and want to remove the .pyc files they've left behind. I ... would. What am I doing wrong? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.7k views
1 answer
    How would I count the total number of lines present in all the files in a git repository? git ls-files gives me a ... all these files] | wc -l See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    How do you parse a CSV file using gawk? Simply setting FS="," is not enough, as a quoted field with a comma inside will be ... ----------------- See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I have to create a Shell Script wherein one of the parameters will be the date in the format dd/mm/yyyy. My ... follows the format dd/mm/yyyy ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I have the following code: for x in "${array[@]}" do echo "$x" done The results are something like ... ? Without adding a newline every time? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I have a previously running process (process1.sh) that is running in the background with a PID of 1111 (or some ... to start a new process1.sh! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I want to check if all of my strings exist in a text file. They could exist on the same line or on ... that can easily be extended for regexes? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I'm attempting to write a function in bash that will access the scripts command line arguments, but they are ... trying to avoid stuff $* See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    If I run this code in bash: echo dog dog dos | sed -r 's:dog:log:' it gives output: log dog dos ... I make it replace all occurrences of dog? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I know **/*.ext expands to all files in all subdirectories matching *.ext, but what is a similar expansion ... in the current directory as well? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I'm trying to do a Bitcoin payment from within Python. In bash I would normally do this: bitcoin sendtoaddress ... funds"}) from within Python? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.6k views
1 answer
    I want to rename all the files in a folder which starts with 123_xxx.txt to xxx.txt. For example, my directory ... the correct way to do it? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    I wrote a bash script that gets output from a website using curl and does a bunch of string manipulation on the ... came up empty Any ideas? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I have the following in Bash (In Linux) for dir in Movies/* do (cd "$dir" && pwd|cut -d / -f5|tr ... with percent would show on the same line. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    while getopts "hd:R:" arg; do case $arg in h) echo "usgae" ;; d) dir=$OPTARG ;; R) if [[ ... the sequence of command could be more flexible. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.5k views
1 answer
    Here's how one might list all files matching a pattern in bash: ls *.jar How to list the complement of a ... . all files not matching *.jar? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.8k views
1 answer
    I want to be able to use sed to take an input such as: C:WindowsFolderFile.txt to C:/Windows/Folder/File.txt See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    In jq, how can I convert a JSON to a string with key=value? From: { "var": 1, "foo": "bar", "x": "test" } To: var=1 foo=bar x=test See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...