Pretty stupid choices, at least the first. Ok the second is debatable, but the first is just stupid unless you just want to lock-in your user-base.
The different extended pattern matching operators are listed below, where pattern-list is a list containing one or more filenames, separated using the | character:
*(pattern-list) – matches zero or more occurrences of the specified patterns
?(pattern-list) – matches zero or one occurrence of the specified patterns
+(pattern-list) – matches one or more occurrences of the specified patterns
@(pattern-list) – matches one of the specified patterns
!(pattern-list) – matches anything except one of the given patterns
To use them, enable the extglob shell option as follows:
# shopt -s extglob
1. To delete all files in a directory except filename, type the command below:
$ rm -v !("filename")
Delete All Files Except One File in Linux
2. To delete all files with the exception of filename1 and filename2:
Bundle, install, and run JavaScript & TypeScript — all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner, and npm client built-in.
In bash scripting, the replacement of string is important because it allows you to modify a variable and the text of a file. It also helps in file and text processing and to validate user input.
To replace a string in bash, check the following methods:
Using Parameter expansion: ${String/pattern/replacement}
Using the sed command: sed 's/pattern/replacement/' filename
Using the awk command: "input_str" | awk 'pattern { action }'
Using the perl command: perl [options] -e 'action' filename
Using the tr command: tr 'old_chars' 'new_chars' < "input_file"
Dive into the article to learn these methods of how to replace a bash string in detail.
Posted by EditorDavid on Saturday March 30, 2024 @01:34PM from the fun-with-photocatalysis dept.
“Researchers have successfully transformed CO2 into methanol,” reports SciTechDaily, “by shining sunlight on single atoms of copper deposited on a light-activated material, a discovery that paves the way for creating new green fuels.” Tara LeMercier, a PhD student who carried out the experimental work at the University of Nottingham, School of Chemistry, said: “We measured the current generated by light and used it as a criterion to judge the quality of the catalyst. Even without copper, the new form of carbon nitride is 44 times more active than traditional carbon nitride. However, to our surprise, the addition of only 1 mg of copper per 1 g of carbon nitride quadrupled this efficiency. Most importantly the selectivity changed from methane, another greenhouse gas, to methanol, a valuable green fuel.”
Professor Andrei Khlobystov, School of Chemistry, University of Nottingham, said: “Carbon dioxide valorization holds the key for achieving the net-zero ambition of the UK. It is vitally important to ensure the sustainability of our catalyst materials for this important reaction. A big advantage of the new catalyst is that it consists of sustainable elements — carbon, nitrogen, and copper — all highly abundant on our planet.” This invention represents a significant step towards a deep understanding of photocatalytic materials in CO2 conversion. It opens a pathway for creating highly selective and tuneable catalysts where the desired product could be dialed up by controlling the catalyst at the nanoscale. “The research has been published in the Sustainable Energy & Fuels journal of the Royal Society of Chemistry.”
Thanks to long-time Slashdot reader Baron_Yam for sharing the article.
sudo apt purge xz-utils
[sudo] password di paolo:
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto
I seguenti pacchetti sono stati installati automaticamente e non sono più richiesti:
libsensors-config libsensors5
Usare "sudo apt autoremove" per rimuoverli.
I seguenti pacchetti saranno RIMOSSI:
sysstat* xz-utils*
0 aggiornati, 0 installati, 2 da rimuovere e 877 non aggiornati.
Su Debian stable; ma anche sulla mia macchina “da combattimento”, è bastato un sudo apt update; sudo apt -t testing install xz-utils
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.