Ubuntu – Make Docker a proper UNIX citizen
I'm trying to write a wrapper over Docker to propagate signals and standard output in a sensible way. First, Docker doesn't handle SIGPIPE nicely: $ docker run --rm ubuntu yes | head y y y y y y y y…
I'm trying to write a wrapper over Docker to propagate signals and standard output in a sensible way. First, Docker doesn't handle SIGPIPE nicely: $ docker run --rm ubuntu yes | head y y y y y y y y…
I need to make diff ignore the case of my inputs. Both inputs contain German umlauts like ä and Ä. Option -i successfully makes diff ignore the case of my input for other characters like a and A, but not…
I have few files under the current directory, ./a.txt ./b.txt ./dir1/c.txt ./dir1/d.txt When I execute find . -path './dir1' -prune -o -name "*.txt", as expected, it excludes everything under 'dir1' and prints, ./a.txt ./b.txt ./dir1 now if I switch the…
#!/bin/sh emoji="U1f300-U1f5ffU1f900-U1f9ffU1f600-U1f64fU1f680-U1f6ffU2600-U26ffU2700-U27bfU1f1e6-U1f1ffU1f191-U1f251U1f004U1f0cfU1f170-U1f171U1f17e-U1f17fU1f18eU3030U2b50U2b55U2934-U2935U2b05-U2b07U2b1b-U2b1cU3297U3299U303dU00a9U00aeU2122U23f3U24c2U23e9-U23efU25b6U23f8-U23fa" sample="This 🍒 is ⭐ a 🐢 line 🤮 of 😃 emoji ✈" echo $sample echo $sample | LC_ALL=UTF-8 sed -e "s/[$(printf $emoji)]//g" The preceding script can obtain normal execution results on other Linux operating systems (such as centos).…
I am trying to run a function through multiple processes in bash (on CentOs). The function does different filtering over curl: STEP=50 function filtering() { local i="$1" curl -s -g -X GET 'https://url.com?filter='$i'_filter' } for (( i=0; i<=TOTAL; i+=STEP ));…
I have a file in raw HTML raw text format. It contains a list of files with thousands of lines. The list looks like this: <html> <head><title>Index of /</title></head> <body> <h1>Index of /</h1><hr><pre><a href="../">../</a> <a href="9999920122022-SP.xml">9999920122022-SP.xml</a> 20-Dec-2022 15:46 2652 <a…
Within a python script I have a function which looks as below: def NotifierFunc(Mail, Ticket_Num, Open_DtTime): cmd = "/home/path/MyPerlScript.pl --channel 'MyChannel' --userid 'itsme' --message 'Hello <at>"+Mail+"<at> : The ticket <a href='`echo 'http://snview/'"+Ticket_Num+">`echo "+Ticket_Num+"`</a> is not closed for more than 72…
I'm trying to capture and "store away" (preferably in a variable) the first line of a command output and forward the remainder of the output back to stdin of the next command in a pipe. As an FYI, the purpose…
I have a problem with printing signs n. My script is make for bash and is set to posix=yes. When I ran program on Mac the printing to bash is done only by echo "text here". But when I ran…
I need to manage domain names (fqdn), printing all of them somewhere, possibly in a file csv. All infos are in apache conf files, I need to associate all the domain name with ip and port. This is the sample…