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
741 views
1 answer
    In bash one can escape arguments that contain whitespace. foo "a string" This also works for arguments to ... the arguments contain whitespace? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
652 views
1 answer
    set -eu VAR=$(zcat file.gz | head -n 12) works fine set -eu -o pipefail VAR=$(zcat file.gz | head ... millions of lines (~ 750 MB, compressed). See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
676 views
1 answer
    In crontab, can you do something like this? * * * * * echo $( date +%F) >> /path/date.txt See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    Using Groovy and it's java.lang.Process support, how do I pipe multiple shell commands together? Consider this ... out any anything. Thoughts? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
964 views
1 answer
    next code doesnt work because of spaces in file names, How to fix? IFS = ' ' for name in `ls ` do number=` ... mv "$name" "./$number" fi done See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
592 views
1 answer
    I am trying to match a string with a regex in a shell script. This string is a parameter of the script ( $1 ... guys have an idea ? Thanks ! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
734 views
1 answer
    I'm trying to create a backup script in bash, to tar the contents of a folder and move the resulting file ... Intended output: 2013-08-29.tar See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
982 views
1 answer
    I have a huge CSV file, 1m lines. I was wondering if there is a way to split this file into smaller ones ... A one-line command would be great. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
537 views
1 answer
    I was reviewing some of my old code and came across this syntax: extractDir="${downloadFileName%.*}-tmp" The ... -brace syntax mean in bash? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
930 views
1 answer
    bc doesn't like numbers expressed in scientific notation (aka exponential notation). $ echo "3.1e1*2" | bc ... format that bc will understand? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
810 views
1 answer
    I'm writing a bash script, which does several things. In the beginning it starts several monitor scripts, each ... way to handle this situation? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
728 views
1 answer
    I need to automate logging into a TELNET session using expect, but I need to take care of multiple passwords ... for assistance in the matter! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
514 views
1 answer
    Given the following shell script, would someone be so kind as to explain the grep -Po regex please? #!/bin/bash # Issue the ... s*"K([^"]*)') fi See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
547 views
1 answer
    I do have a lot of XML files I would like to import in the table xml_data: create table xml_data(result xml); ... file at once into single row. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
578 views
1 answer
    Yesterday it was suggested to me that using command substitution in bash causes an unnecessary subshell to be ... in isolation would not? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
605 views
1 answer
    I'm trying to find a shell command that will open Google Chrome with specific x and y coordinates (so that I ... -chrome http://www.google.com/ See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
947 views
1 answer
    How can I remove the filename prefix in Bash as in the following example: XY TD-11212239.pdf to get 11212239.pdf i.e, remove XY TD-? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    From what I can find, when you use single quotes everything inside is considered literal. I want that for my ... chars inside the single quotes? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
597 views
1 answer
    GNU bash, version 1.14.7(1) I have a script is called "abc.sh" I have to check this from abc.sh ... running or not from that script only ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
682 views
1 answer
    I have a problem with some zombie-like processes on a certain server that need to be killed every now and then. ... longer than an hour or so? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
572 views
1 answer
    I am using the program synergy together with an ssh tunnel It works, i just have to open an console an type these ... has to be an easier way.) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
567 views
1 answer
    Consider the following: me@mine:~$ cat a.sh #!/bin/bash echo "Lines: " $LINES echo "Columns: " ... better than losing the previous screen) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
846 views
1 answer
    Why would this work timeout 10s echo "foo bar" # foo bar but this wouldn't function echoFooBar { echo "foo bar" ... and how can I make it work? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
780 views
1 answer
    given input echo 1,2,3,4,5,6,7,8,9,...100 If I want to cut columns 5 I can do cut -d, -f-4,6- ... columns like 5, 7,etc is there a one liner? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    Just started out with Bash scripting and stumbled upon jq to work with JSON. I need to transform a JSON string ... me in the right direction? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
656 views
1 answer
    I know in bash I can run one command after another by separating them by semicolons, like $ command1; command2 Or ... term for what Ctrl-z does? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
839 views
1 answer
    I've a pipline doing just command1 | command2 So, stdout of command1 goes to command2 , while stderr of ... is still going to command2 ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
810 views
1 answer
    I'm using a serial terminal to provide input into our lab experiment. I found that using $ echo "5X5 ... to execute a multiplication operation? 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

...