TransWikia.com
  1. All Categories
  2. Unix & Linux

Unix & Linux : Recent Questions and Answers (Page 45)

Find answers to your questions about Unix & Linux or help others by answering their Unix & Linux questions.

How to expand "word" in bash? Not talking about file wildcards

Sorry for so simple question, but I could not find a solution myself. I run:$ echo {1..4}1 2 3 4And that's OK to me. But if I:$ echo...

Asked on 10/31/2021 by Luis Santos

2 answer

Parse a string using keywords

I am using a bash command, gps location, that returns a date, time and location information.[john@hostname :~/develp] $ gps locationLocation: {"date": "16/07/20", "time": "19:01:22", "latitude": "34.321", "longitude": "133.453", "altitude":...

Asked on 10/31/2021 by Beaker

7 answer

Zenity Cancel button for GNU parallel progress bar

As GNU parallel's manual shows, you can use a zenity progress bar with parallel:seq 1000 | parallel -j30 --bar '(echo {};sleep 0.1)' ...

Asked on 10/31/2021 by ChameleonScales

2 answer

Why does the command a-=2 fail?

After executing the command declare -i a=5, the command a+=2 succeeds, but the command a-=2 fails. Can someone explain this strange behavior of bash?...

Asked on 10/31/2021 by tmpbin

4 answer

Shell dropping every other character of input

I manage software on a bunch of RHEL 6.10 VMs, typically either as a service account or root using sudo -i. Periodically, my shell starts dropping every other character. For...

Asked on 10/31/2021 by Michael Davis

3 answer

Comm/Diff (or alternative) that respects glob characters: is this possible?

Restricting "globbing" grammar to, specifically, suffix-globbing, * characters only, suppose I have:// foo.txtfoo.*biz// bar.txtbarfoo.barAnd I would like to write:diff <(sort -u foo) <(sort -u bar)# alternativelycomm -3 <(sort...

Asked on 10/31/2021

1 answer

How to conditionally redirect the output to files based on variable in bash

I'm trying to use eval command to eval a comment -- I'm not sure if this is the right way to do it. Example: i=?? (What I want here is...

Asked on 10/31/2021 by Raywando

1 answer

Out of memory, but swap available

My server runs out of memory even though there is swap available. Why? I can reproduce it this way:eat_20GB_RAM() { perl -e '$a="c"x10000000000;print "OKn";sleep 10000';}export -f eat_20GB_RAMparallel...

Asked on 10/31/2021

1 answer

How can I display list of files in a directory?

I created new directory called dir1 Then I use touch command to add apple banana carrot date egg fish grape ham After that I created file Wildcards.sh (incidentally I...

Asked on 10/31/2021 by brocharvey

4 answer

sed expression to extract group of the first match

I have the following text:somegarbageSTARTfirstgroupENDsomeendgarbagesomeohtergarbageSTARTsecondgroupENDsomeotherendgarbage...I would like to extract firstgroup using sed. I tried sed -nr 's/.*START(.*)END.*/1/p', but it doesn't work, it extracts all matches not only the first...

Asked on 10/31/2021

2 answer

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP