- Nov 2024
-
www.columbia.edu www.columbia.edu
-
annual reports of Lovins’ RockyMountain Institute include Shell and BP among corporate donors providing minimum annualsupport of $500,000 each
- climate crisis - greenwashing - Amory Lovins - Rocky Mountain Institute - 500,000 USD donations from Shell Oil and BP - Jim Hansen
-
Lovins’ later book, Reinventing Fire,48 has a fawning Foreword writtenby the President of Shell Oil Company, which is not surprising since Lovins had adjusted hisgraphs so that fossil fuel phaseout was moved to 2050
for - climate crisis - greenwashing - Amory Lovins - Rocky Mountain Institute - book - Reinventing Fire - forward by Shell Oil president - Jim Hansen
-
-
www.desmog.com www.desmog.com
Tags
- ExxonMobil
- Edelman
- Uk
- Duncan Meisel
- UAE
- Dentsu
- FleishmanHillard
- Aramco
- Burson
- Saudi-Arabien
- fossil fuel lobbyism
- Shell
- Desmog
Annotators
URL
-
- Oct 2024
-
www.derstandard.at www.derstandard.at
-
Viele CO2-Kompensationsgeschäfte mit chinesischen Firmen, die Bestätigungen für angebliche „upstream emission reduction“ anbieten, sind vermutlich betrügerisch. Durch die Anrechnung solcher angeblicher Reduktionen haben österreichische Firmen wie die OMV, Shell Austria und MOL Austria versucht, den vorgeschriebenen Anteil von 13% erneuerbare Energie in ihren Produkten zu erreichen. Die Staatsanwaltschaft hat eine entsprechende Anzeige des österreichischen Klimaschutzministeriums bisher nicht weiter verfolgt, die beweislage ist aber deutlich. https://www.derstandard.at/story/3000000239520/millionen-betrugsverdacht-rund-um-co2-ausgleichsgeschaefte-mit-china-weitet-sich-aus
-
-
www.theguardian.com www.theguardian.com
-
Nicht nur #BP investiert in mehr fossile Infrastruktur und verzichtet auf Dekarbonisierungsziele. Große Firmen und Investmentgesellschaften geben die Orientierung an „Environmental, social and governace“- (ESG-)Standards zunehmend auf. Für #BlackRock, #Vanguard, #JPMorgan und #StateStreet spielen sie keine oder nur noch eine geringe Rolle, die EU hat sie verwässert. Der Guardian berichtet darüber in einem gut recherchierten Überblicksartikel. https://www.theguardian.com/business/2024/oct/13/very-concerning-bp-dilutes-net-zero-targets-as-global-retreat-from-green-standards-gathers-pace
Tags
- European Sustainability Reporting Standards
- lowering of climate ambition
- by: Jillian Ambrose
- Lewis Johnston
- Climate Action 100+
- Greenpeace
- plastic
- Quilter Cheviot
- Unilever
- JP Morgan
- fossil expansion
- ShareAction
- Shell
- ESG standards
- State Street
- BlackRock
- Gemma Woodward
- BP
- by: Julia Kollewe
- by: Kalyeena Makortoff
- Vanguard
Annotators
URL
-
- Sep 2024
-
web.archive.org web.archive.org
-
while true; do waitforsave assignment.ly; lily assignment.ly; say "done"; done
-
- Aug 2024
-
www.repubblica.it www.repubblica.it
Tags
- SeaCorridor
- Volkswagen
- Citigroup
- Enel
- Greenpeace
- Kia
- Volvo
- Eni
- Ford
- Stellantis
- Shell
- Intesa Sanpaolo
- Unicredit
- Reclaim Finance
- Snam
- BP
- T&E
- ReCommon
Annotators
URL
-
-
www.repubblica.it www.repubblica.it
-
- May 2024
-
www.liberation.fr www.liberation.fr
-
In Frankreich wird bei Fécamp der dritte Offshore-Windpark eröffnet. Frankreich will die Windenergie energischer entwickeln als bisher. Dazu gehört auch die Auftragsvergabe für einen ersten schwimmenden Windpark – die einzige Form von Windparks, die in großen Teilen des Mittelmeerraums möglich ist. Anlagen für Windenergie wurden im vergangenen Jahr in Europa in Rekordtempo installiert. Die Branche hat große Probleme dabei, sich gegen die internationale, vor allem chinesische Konkurrenz zu behaupten, die wesentlich mehr staatliche Unterstützung erhält. https://www.liberation.fr/economie/a-fecamp-le-troisieme-parc-eolien-en-mer-sort-de-leau-mais-la-france-reste-a-la-traine-20240515_T3JON5O7WFEQ7ETICQYDCVTNWI/
-
-
www.derstandard.at www.derstandard.at
-
Seit dem Pariser Abkommen finanzierten die 60 größten Banken 425 fossile Großprojekte - sogenannte carbon bombs mit einem zu erwartenden CO2-Ausstoß von jeweils über einer Gigatonne - mit insgesamt 1,8 Billionen Dollar. Der Standard-Artikel geht auf ein Projekt zurück, bei dem Daten des Carbon Bombs-Projekts, des Global Energy Monitor und von Banking on Climate Chaos ausgewertet und visualisiert werden. https://www.derstandard.at/story/3000000193065/billionenkredite-fuer-fossile-grossprojekte-wie-banken-die-klimakrise-mitfinanzieren
Bericht/Visualisierung: https://www.carbonbombs.org/
Tags
- Saudi Arabia
- by: Philip Prayer
- Abdulaziz bin Salman
- USA
- Libya
- by: Anastasia Trenkler
- Eni
- fossil expansion
- Shell
- JPMorgan
- ExxonMobil
- Stranded fossil-fuel assets translate to major losses for investors in advanced economies
- OMV
- Equinor
- Citi
- Unicredit
- Deutsche Bank
- Permian basin
- ICBC
- TotalEnergies
- Oxford Institute for Energy Studies
- banks
- Repsol
- carbon bombs
- éclaircies
- BNP Paribas
- Marcellus Shale
- fracking
- 2023-10-31
- stranded fossil fuel assets
- China
- Net Zero Banking Alliance
- Data for Good
- by: Alicia Prager
- El Sharara
- BP
- Gazprom
- Bill Farren-Price
- fossil fuel finance
Annotators
URL
-
-
www.theguardian.com www.theguardian.com
-
Shell plant nicht mehr, seine Öl-Produktion bis 2030 wenigstens um 1-2% pro Jahr zu reduzieren. Zwischen 2023 und 2035 will die Firma jährlich 40 Milliarden Dollar in die Öl-und Gasproduktion und 10-15 Milliarden in „Low-Carbon“-Produkte investieren. Die Ölproduktion soll bis 2030 stabil bleiben, die Gasproduktion ansteigen. Shell beruft sich auch darauf, dass man 2021 die Anteile an einem Projekt im Permian Basin verkauft und damit die Ölproduktion früher als geplant bereits gedrosselt habe. https://www.theguardian.com/business/2023/jun/14/shell-drops-target-to-cut-oil-production-as-ceo-guns-for-higher-profits
-
-
www.theguardian.com www.theguardian.com
-
Seit dem Pariser Abkommen haben europäische Banken fossile Energieunternehmen durch die Ausgabe vom Anleihen in Wert von ca. einer Billion (1000 Milliarden) Euro unterstützt, wie eine Recherche des Guardian ergibt. Anleihen (Bonds) sind inzwischen die wichtigste Form der Finanzierung der Fossilindustrie. https://www.theguardian.com/business/2023/sep/26/europes-banks-helped-fossil-fuel-firms-raise-more-than-1tn-from-global-bond-markets
Tags
- expert: Andreas Rasche
- actor: Rosneft
- institution: Copenhagen Business School’s Centre for Sustainability
- NGO: Follow the Money
- actor: Crédit Agricole
- actor: BNP Paribas
- 2023-09-26
- fossil expansion
- expert: Alice Delemare Tangpuori,
- NGO: Sunrise Project
- actor: HSBC
- actor: Barclays
- actor: BP
- Reclaim Finance
- actor: Petrobras
- actor: Petróleos Mexicanos
- actor: Deutsche Bank
- fossil fuel finance
- actor: Shell
- expert: Lara Cuvelier
- NGO: Investico
Annotators
URL
-
-
-
Eine Studie von Greenpeace unter dem Titel "The Dirty Dozen" zeigt, dass die europäischen Fossil-Konzerne ihre enormen Gewinne weiterhin vor allem in fossile Energien investieren. Nur 7,3% ihrer Investitionen flossen 2022 in erneuerbare Energien. Nur 0,3% der von ihnen produzierten Energie stammte aus erneuerbaren Quellen.
-
-
www.liberation.fr www.liberation.fr
-
Die Fossilindustrie, im Augenblick vor allem der nächste COP-Präsident Sultan Al Jaber, promoten Carbon Capture and Storage als Weg, emissionsfrei fossile Energien verwenden zu können. In einem ausführlichen Artikel, der auch auf die aktuelle Situation in Frankreich eingeht, zeigt die Libération, warum CCS keine Lösung für die Klimakrise ist. https://www.liberation.fr/environnement/climat/captation-de-co2-aux-grands-maux-les-faux-remedes-20230612_Y5YLUY2NWBG2FD45YIINI3RE64/
Tags
- institution: IEEFA
- actor: Equinor
- event: COP28
- expert: Roland Séférian
- actor: Yara
- process: CCS
- total co2 capturing per year: 44Mt
- institution: IEA
- time: 2022-2030
- actor: Sultan Al Jaber
- actor: Christina Figures
- project: Northern Lights
- project: Sleipner
- topic: CCS
- region: global
- actor: Shell
- TotalEnergies
Annotators
URL
-
-
www.derstandard.at www.derstandard.at
-
-
www.theguardian.com www.theguardian.com
-
Eine neue, grundlegende Studie zu Klima-Reparationen ergibt, dass die größten Fosssilkonzerne jählich mindestens 209 Milliarden Dollar als Reparationen an von ihnen besonders geschädigte Communities zahlen müssen. Dabei sind Schäden wie der Verlust von Menschenleben und Zerstörung der Biodiversität nicht einberechnet. https://www.theguardian.com/environment/2023/may/19/fossil-fuel-firms-owe-climate-reparations-of-209bn-a-year-says-study
Studie: Time to pay the piper: Fossil fuel companies’ reparations for climate damages https://www.cell.com/one-earth/fulltext/S2590-3322(23)00198-7
Tags
- TotalEnergies
- climate reparations
- institution: Climate Accountability Institute
- Time to pay the piper
- topic: climate reparations
- expert: Margaretha Wewerinke-Singh
- actor: Aramco
- NGO: Climate Action Network
- NGO: Power Shift Africa
- actor: Exxon
- expert: Richard Heede
- actor: BP
- topic: loss and damage
- expert: Harjeet Singh
- expert: Erika Lennon
- expert: Marco Grasso
- topic: climate finance
- actor: Chevron
- actor: Shell
- expert: Mohamed Adow
Annotators
URL
-
-
-
Ausführliche Artikel der taz über das fossil fuel crime file, eine von Greenpeace erstellte Liste von Verbrechen und zivilrechtlichen Vergehen derFfossilindustrie. Sie dient als Basis für juristische Aktionen. https://taz.de/Fossilindustrie-vor-Gericht/!5936699/
Tags
- project: Mining Impact
- expert: Donald Pöls
- project: EACOP
- actor: OMV
- region: Niger delta
- actor: Equinor
- actor: ENI
- actor: Glencore
- actor: Statoil
- expert: Channa Samkalden
- NGO: Greenpeace
- NGO: Friends of the Earth
- project: East African Crude Oil Pipeline
- actor: Lundin Energy
- expert: Lisa Göldner
- mode: legal action
- NGO: Milieudefensie
- actor: Shell
- TotalEnergies
Annotators
URL
-
-
www.reuters.com www.reuters.com
-
Der italienische Energiekonzern ENI wird über die bestehenden Verträge hinaus über 27Jahre bis zu 1 mtpa (Million Tonnen pro Jahr) LNG aus Qatar beziehren. Vorangegangen waren ähnliche Deals über jährlich 3,5 mtpa über 27 Jahre mit Shell und TotalEnergies. Ein Deal von QatarEnergy und ConocoPhilips vom November 2022 sieht vor, dass Deutschland ab 2026 über 15 Jahre 2 mtpa LNG bezieht. Ähnliche Abkommen schloss QatarEnergies auch zurLNG-Versorgung asiatischer Länder ab. https://www.reuters.com/markets/commodities/qatar-signs-27-year-gas-supply-deal-with-italys-eni-2023-10-23/
-
-
reclaimfinance.org reclaimfinance.org
-
www.theguardian.com www.theguardian.com
-
Shell will die Emissionsintensität seiner Öl-Produkte bis 2030 nur noch um 15-20% statt bisher um 20% reduzieren. Das verfässerte Ziele ist in der jüngsten Version der Energiewende-Strategie des Konzerns enthalten, die einen Teil des Jahresberichts 2023 bildet. Für Gas wurden keine Angaben gemacht. Auch für die absolute Höhe der Emissionen gibt der Fossilkonzern kein Ziel an. Durch neue Projekte wird Shell seine Öl- und Gasproduktion bis 2025 um 500.000 Barrel täglich steigern.
-
-
www.reuters.com www.reuters.com
-
Norwegen erteilt in diesem Jahr 62 Lizenzen für die Exploration von Öl- und Gasfeldern, gegenüber 47 im vergangenen Jahr. Die Steigerung geht auf das Interesse von Öl- und Gasgesellschaften zurück. Gegen den Widerstand von NGOs betreibt Norwegen weiterhin eine Ausweitung der Öl- und Gasproduktion, die zu jahrzehntelanger Förderung führen soll. Stark gewachsen ist dabei das Interesse an der Barents Sea. https://www.reuters.com/business/energy/norway-increases-number-new-oil-gas-drilling-permits-including-arctic-2024-01-16/
-
-
www.theguardian.com www.theguardian.com
Tags
- by: Dharna Noor
- climate dlay
- Dan Cohn
- Institute for Energy Economics and Financial Analysis
- 2023-07-16
- Darren Woods
- fossil expansion
- Shell
- Naomi Oreskes
- ExxonMobil
- Patrick Pouyanne
- Discourses of Climate Delay
- lowering climate ambition
- Wael Sawan
- fossil industry
- BP
- Timmons Roberts
- TotalEnergies
Annotators
URL
-
-
www.liberation.fr www.liberation.fr
-
Reclaim Finance zufolge ist 2022/23 die Finanzierung von 437 Öl- und Gasprojekte genehmigt worden. Beteiligt sind 200 Unternehmen in 58 Ländern. Die Projekte widersprechen der Roadmap der IEA zur Klimaneutralität von 2021, in der keine neuen fossilen Projekte vorgesehen sind. Eine Schlüsselrolle haben staatliche Firmen in Öl und Gas produzierenden Staaten. Bei der Zahl der Projekte liegen Russland und Norwegen vorne. Europäische Ölgesellschaften haben eine Reduzierung ihrer (unzureichenden) Dekarbonisierungsziele angekündigt. https://www.liberation.fr/environnement/437-nouveaux-projets-petroliers-et-gaziers-quels-sont-les-pays-moteurs-des-energies-fossiles-en-2023-20231130_QRXDTQKM7NBIZGXWUNFQ7QRSWM/
-
-
-
Dichter und sehr gut dokumentierter Überblicksratikel über die Expansionspläne der Öl- und Gasindustrie. Aus unerschlossenen Feldern sollen 230 Milliarden Barrel Öläquivalent gefördert werden - im klaren Widerspruch zum Pariser Abkommen. Durch Ausbeutung neuer Lager werden bis 2025 voraussichtlich 70 Gt CO<sub>2</sub> und damit 17% des Budgets für das 1,5° Ziel ausgestoßen. Eingegangen wird auch auf den Ausstiegsplan des Tyndall Centre. https://taz.de/Run-auf-fossile-Brennstoffe/!5973686/
Tags
- Beyond Oil and Gas Alliance
- by: Malina Dittrich
- Norway
- Uk
- USA
- Nabu
- The Dirty Dozen
- Rosebank
- fossil expansion
- Namibia
- Shell
- ExxonMobil
- South Africa
- Adnoc
- 2023-12-02
- Equinor
- Total
- Urgewald
- Global Oil & Gas Exit List
- TotalEnergies
- Energy Comment
- Oilchange International
- Willlow
- by: Christian Jakob
- legal action
- Canada
- Mozambique
- Tyndall Centre
- Bay-du-Nord
- Saber Hossain Chowdhury
- Planet Wreckers
- IEA
- Wintershall Dea
- Australia
- BP
- Gazprom
- Russia
Annotators
URL
-
-
-
In den Niederlanden hat die Berufungsverhandlung begonnen, in der Shell gegen ein Urteil angeht, dass es zu einer drastischen CO2-Reduktion zwingt. Der wichtigste Gegner ist die Umweltorganisation Milieu defense. Shells Anwälte veranstalten eine propaganda-show, um die Verwendung fossiler Brennstoffe weiter zurechtfertigen. https://taz.de/Shell-vor-Gericht/!5999034/
-
-
www.reuters.com www.reuters.com
-
Shell hat seine Emissionsziele für 2030 reduziert und die Ziele für 2035 gestrichen. Strategische Ziele unter dem neuen CEO Wael Savan sind Erhöhung der Profitabilität, Erhaltung des Ölgeschäfts auf dem bestehenden Niveau und Ausbau des Gasgeschäfts. Shell ist der größte LNG-Händler der Welt. https://www.reuters.com/sustainability/climate-energy/shell-loosens-2030-carbon-emissions-target-2024-03-14/
-
-
www.nytimes.com www.nytimes.com
-
Verantwortliche der großen US-Fossilunternehmen haben vertraulich die öffentlichen Statements der Firmen zur Dekarbonisierung relativiert und in ihrer Öffentlichkeitsarbeit gegen die von ihnen selbst offiziell vertretene Politik agiert. Das geht aus Dokumenten hervor, deren Herausgabe der Ausschuss des Repräsentantenhauses für Oversight und Reform erzwungen hatte. https://www.nytimes.com/2022/09/14/climate/oil-industry-documents-disinformation.html
-
-
www.theguardian.com www.theguardian.com
-
Verantwortliche der großen amerikanischen Ölfirmen haben auch nach 2015 privat zugegeben, dass sie die Gefahren fossiler Brennstoffe heruntergespielt haben. Sie haben internationale Pläne gegen die globale Erhitzung nach außen hin unterstützt und nach innen kommuniziert, dass ihre Firmenpolitik diesen Plänen widerspricht. Und sie haben gegen politische Maßnahmen lobbyiert, hinter die sie sich offiziell gestellt haben. Das alles ergibt sich aus dem neuen Bericht des amerikanischen Kongresses über die Desinformations-Politik von Big Oil. Ausführlicher Bericht mit Informationen über mögliche juristische Konsequenzen. https://www.theguardian.com/us-news/2024/apr/30/big-oil-climate-crisis-us-senate-report
-
- Apr 2024
-
-
In den USA unterscheidet sich die Regulierungspolitik der Biden-Administration in der Energiepolitik drastisch von der der Trump-Administration. Ein Sieg Trumps im Herbst würde zu einer weiteren Kursumkehr führen. Diese Veränderung enbedeuten für die amerikanische Wirtschaft ein großes Risiko. die New York Times berichtet über Einschätzungen der Schädlichkeit der politischen Kurzwechsel aus wirtschaftlicher Sicht und informiert dabei über die wichtigsten regulierungsmaßnahmen der demokratischen Administrationen. https://www.nytimes.com/2024/04/26/climate/biden-trump-environmental-regulations.html
Tags
- by: Coral Davenport
- country: USA
- actor: BP
- actor: ExxonMobil
- expert: Steve Cicala
- actor: Biden Administration
- event: EPA limiting pollution from coal burning power plants
- expert: Costas Gavriilidis
- expert: Douglas Holtz-Eakin
- actor: Republican Party
- mode: executive action
- actor: Shell
Annotators
URL
-
- Mar 2024
-
stackoverflow.com stackoverflow.com
-
If you want to write an awk script, which portable to any awk implementations and versions (gawk/nawk/mawk...) it is really hard, even if with --posix (gawk)
-
-
stackoverflow.com stackoverflow.com
-
The function body can be any compound command, not just a group command ( {} ). Use a sub-shell: is_hello_world() ( shopt -s nocasematch [[ "$1" =~ "hello world" ]] )
-
foo () {...} just looks so natural, you never think that the braces aren't part of the function syntax, rather than the mostly commonly used compound command.
-
I suppose it would be easy to make a pushshopt function like there is a pushd, and use bash arrays to remember previous option before setting them. Like pushshopt +extglob -nocasematch and popshopt
-
-
www.theguardian.com www.theguardian.com
-
Die Gewinne von Shell sind 2023 auf 28 Milliarden Dollar gesunken; 2022 hatten sie 40 Milliarden Dollar betragen. Trotzdem war 2022 eines der erforlgreichsten Jahre der Firmengeschichte; die Dividenden sollen erhöht werden. Greenpeace reagierte mit einer satirischen Party, bei der die Verbrennung der Zukunft gefeiert wird. U.a. mit Projekten in Brasilien und im Golf von Mexiko setzt Shell die fossile Expansion fort. https://www.theguardian.com/business/2024/feb/01/shell-to-raise-dividends-again-despite-30-fall-in-annual-profits
-
-
stackoverflow.com stackoverflow.com
-
nowadays many people work with docker containers. Most default docker images do not have bash and something like [[ $string == *foo* ]] will not work.
-
It's not so much a criticism as the preference of a more universal solution over a more limited one. Please consider that, years later, people (like me) will stop by to look for this answer and may be pleased to find one that's useful in a wider scope than the original question. As they say in the Open Source world: "choice is good!"
-
- Feb 2024
-
www.theguardian.com www.theguardian.com
-
unix.stackexchange.com unix.stackexchange.com
-
#!/bin/sh if [ "$#" -eq 0 ]; then set -- /dev/stdin fi for pathname do gawk -f awk_prac.awk "$pathname" done
-
if [ "$#" -eq 0 ]; then cat else printf '%s\n' "$@" fi |
-
-
unix.stackexchange.com unix.stackexchange.com
-
if [ "$#" -ne 0 ] then printf '%s\n' "$1" else cat fi |
Comparible to this solution for the case of a script file (rather than function): https://hyp.is/6UIWdNaREe6L5DMx96BIOA/unix.stackexchange.com/questions/580971/how-to-write-a-script-that-accepts-input-from-stdin-or-a-file
-
-
stackoverflow.com stackoverflow.com
-
Do not pass arguments right into subshell, it's as unsafe as eval.
-
-
www.theguardian.com www.theguardian.com
-
Die fünf größten westlichen Ölgesellschaften haben seit der Invasion der gesamten Ukraine vor zwei Jahren insgesamt 281 Milliarden Dollar Gewinn gemacht. Sie zahlen damit Rekord-Dividenden an ihre Investoren und investieren gleichzeitig enorme Summen in die weitere fossile Expansion. Shell fährt sein Programm zur Entwicklung erneuerbarer Energien zurück und hat die Selbstverpflichtung aufgegeben, die Ölproduktion jährlich zu reduzieren.https://www.theguardian.com/business/2024/feb/19/worlds-largest-oil-companies-have-made-281bn-profit-since-invasion-of-ukraine
-
- Jan 2024
-
-
An der Küste Louisianas schädigt der Bau von LNG-Terminals die Umwelt. Deutsche Konzerne profitieren von den laxen Kontrollen. Der Bedarf Deutschlands treibt den LNG-Boom weiter an, deutsche Banken beteiligen sich an der Finanzierung. Reportage der Tat https://taz.de/LNG-Boom-in-den-USA/!5975624/
Tags
- Landesbank Baden Württemberg
- Deutsche Umwelthilfe
- Venture Global
- Bayerische Landesbank
- USA
- LNG
- USA-Germany
- Energie Baden-Württemberg AG
- Shell
- Louisiana Bucket Brigade
- Germany
- The Greenhouse Gas Footprint of Liquefied Natural Gas (LNG) Exported from the United States
- Louisiana
- Sheila Tahir
- DowDuPont
- Deutsche Bank
- Plaquemines-Terminal
- LNG expansion
- Cameron LNG
- 2024-01-05
- Fracking
- Landesbank Hessen-Thüringen
- by: Johannes Streeck
Annotators
URL
-
-
-
Guter Überblick über das Lobbying-Netzwerk der deutschen Gasindustrie. Der Verbraucht an Erdgas hat sich in Deutschland seit 1990 verdoppelt, obwohl Erdgas insgesamt etwa so viel Emissionen verursacht wie Kohle. Die LNG-Infrastruktur, die die deutsche Bundesregierung gerade aufbaut, ist auf um ein Drittel höhere Kapazitäten angelegt, als aus Russland importiert wurden. https://taz.de/Fossile-Politik/!5983492/
Tags
- Nordeuropäische Erdgasleitung
- Karsten Möring
- Gerhard Schröder
- Zukunft Gas
- Markus Wehner
- Nina Katzemich
- Wingas
- Calcasieu Pass 2
- natural gas
- Siegmar Gabriel
- EnBW
- Shell
- Opal
- NEL
- Friedbert Pflüger
- Uniper
- Equinor
- Timon Gremmels
- Béla Anđa
- Evonik
- Nord Stream 2
- Moskau Connection
- Plaquemines
- Ostsee-Pipeline-Anbindungsleitung
- Manuela Schwesig
- LobbyControl
- TotalEnergies
- 2024-01-04
- Deutsche Umwelthilfe
- Venture Global
- Tim Kehler
- LNG
- Heino Wiese
- Germany
- Oliver Hill
- Klaus Mangold
- Wintershall Dea
- Constantin Zerger
- Thomas Bareiß
- Matthias Warnig
- LNG expansion
- Matthias Peter
- Gazprom
- Strategic Minds
- Reinhard Bingener
Annotators
URL
-
-
www.theguardian.com www.theguardian.com
-
Die großen Firmen der Fossilindustrie haben 2023 Selbstverpflichtungen zur Dekarbonisierung zurückgenommen. Im wärmsten Jahr der aufgezeichneten Geschichte haben sie an der Perfektionierung ihrer fossilen Geschäftsmodelle und an an einer weiteren Steigerung der Förderung von Öl und Gas gearbeitet. Überblicksartikel im Guardian. https://www.theguardian.com/us-news/2024/jan/03/2023-hottest-year-on-record-fossil-fuel-climate-crisis
-
-
www.liberation.fr www.liberation.fr
-
27 Aktionäre von Shell unterstützen eine Resolution, die den Konzern auffordert, das Pariser Abkommen einzuhalten. Sie repräsentieren 3,4% des Kapitals der Firma. Dieselbe Resolution hatte bei TotalEnergies die Unterstützung von 30% des Kapitals gefunden. Im vergangenen Jahr hatte Shell seine ohnehin minimalen Dekarbonisierungsziele revidiert und angekündigt, die Ölproduktion bis 2030 stabil zu halten. https://www.liberation.fr/environnement/pollution/industries-fossiles-chez-shell-des-actionnaires-activistes-font-pression-pour-de-meilleurs-objectifs-climatiques-20240116_HKBWVGK5CVFMDACJBNKNMP4E2A/
Tags
Annotators
URL
-
-
www.liberation.fr www.liberation.fr
-
BP, Shell, Chevron, ExxonMobil et TotalEnergies werden an ihre Aktionäre für das Jahr 2023 mehr als 100 Milliarden Dollar Dividenden auszahlen und damit den Rekord des Vorjahres noch übertreffen. Ursachen für die Rekordprofite sind der Krieg in der Ukraine und die Umwälzungen auf den Weltenergiemärkten. Die Konzerne gehen weiterhin von der Profitabilität ihres Geschäfts aus. Weltweit leiden ärmere Haushalte unter den gestiegenen Energiekosten. https://www.liberation.fr/environnement/climat/industries-fossiles-les-petroliers-arrosent-leurs-actionnaires-de-dividendes-records-20240102_KETOFCVOT5ANLNWCBWMGNYOE7I/
Tags
- ExxonMobil
- Shell
- 2024-01-02
- Chevron
- Trey Cowan
- Dieter Helm
- Alice Harrison
- Global Witness
- BP
- TotalEnergies
Annotators
URL
-
- Dec 2023
-
-
Einer Greenpeace-Studie zufolge werden die Treibhausgasemissionen von 9 großen europäischen Fossilkonzernen (darunter auch die OMV) im Jahr 2022 zu mindestens 360.000 vorzeitigen Todesfällen allein aufgrund von Extremtemperaturen führen. Dabei gehen die Autor:innen aufgrund einer Übersichtsstudie davon aus, dass 9.318 Tonnen CO<sub>2</sub> im Jahr 2020 statistisch gesehen zu einem zusätzlichen Todesfall bis 2100 führen werden. https://taz.de/Studie-zu-Fossilkonzernen/!5978273/
Studie: https://www.greenpeace.org/nl/todaysemissionstomorrowsdeaths/
-
- Nov 2023
-
www.theguardian.com www.theguardian.com
-
- Oct 2023
-
-
In einem der wichtigsten laufenden Prozesse gegen Fossilunternehmen hat der Staat Kalifornien 5 amerikanische Firmen verklagt. Ein Ziel ist es, einen Ausgleichsfonds für zukünftige Schäden einzurichten, zu denen es durch die bewusst wahrheitswidrige Werbung und Kommunikation der Unternehmen gekommen ist. https://www.nytimes.com/2023/09/15/business/california-oil-lawsuit-newsom.html
Informationen des Gouverneurs von Kalifornien: https://www.gov.ca.gov/2023/09/16/people-of-the-state-of-california-v-big-oil/
-
- Sep 2023
-
mywiki.wooledge.org mywiki.wooledge.org
-
stackoverflow.com stackoverflow.com
-
commands="\nthing1@this is thing 1\!\nthing2@this is thing 2!" while read line;do // do your stuff here line <<< $( echo -e "${commands}" )
Seems to work. Not used to the <<< expression...
-
-
stackoverflow.com stackoverflow.com
-
the OP's problem can not be solved simply by changing $IFS, because $IFS doesn't apply to quoted strings.
-
Bash doesn't do word expansion on quoted strings in this context. For example: $ for i in "a b c d"; do echo $i; done a b c d $ for i in a b c d; do echo $i; done a b c d
-
-
www.faqs.org www.faqs.org
-
unix.stackexchange.com unix.stackexchange.com
-
Using quotes for i in "$(cat $1)"; results in i being assigned the whole file at once. What should I change?
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
Also, always prefix globs with "/" or "./"; otherwise, if there's a file with "-" as the first character, the expansions might be misinterpreted as options.
Tags
Annotators
URL
-
- Aug 2023
- May 2023
-
-
www.telegraph.co.uk www.telegraph.co.uk
-
Why the Church of England is taking on Shell
-
- Apr 2023
-
www.reuters.com www.reuters.com
-
Dutch government promises support to Shell to cut CO2 emissions
-
- Feb 2023
-
www.folia.nl www.folia.nl
-
tijdlijn
Tijdlijn Folia Fossiele industrie
-
-
www.folia.nl www.folia.nl
-
De UvA gaat voorlopig geen nieuwe onderzoekssamenwerkingen met Shell of soortgelijke bedrijven aan.
UvA gaat voorlopig geen nieuwe onderzoekssamenwerkingen met Shell of soorgelijke bedrijven aan.
-
-
www.clientearth.org www.clientearth.org
-
ClientEarth has today filed a world-first lawsuit against the Board of Directors of Shell plc for failing to manage the material and foreseeable risks posed to the company by climate change.
-
- Dec 2022
-
pythonspeed.com pythonspeed.com
-
For sufficiently simple cases, just running a few commands sequentially, with no subshells, conditional logic, or loops, set -euo pipefail is sufficient (and make sure you use shellcheck -o all).
Advice for when you can use shell scripts
Tags
Annotators
URL
-
-
www.zhihu.com www.zhihu.com
-
如何系统地学习Shell编程?
Tags
Annotators
URL
-
- Nov 2022
-
unix.stackexchange.com unix.stackexchange.com
-
Bash maintains an internal hash of previously found executables in your path. In this case, it has details that at one time there was an executable at /usr/bin/siege, and reuses that path to avoid having to search again. You need to tell bash to manually rehash the path for siege like so: hash siege You can also clear all hashed locations: hash -r
-
-
stackoverflow.com stackoverflow.com
-
Remember there are two kinds of variable. Internal Variables and Environment Variables. PATH should be an environment variable.
In my case, I was trying to debug
which asdf
not finding asdf, in a minimal shell.I had checked
bash-5.1$ echo $PATH|grep asdf /home/tyler/.asdf/bin
but ```
The PATH environment variable
env | /bin/grep PATH
`` being empty was the key discovery here. Must have forgotten the
export`. -
All shells should tell you that your path is the same thing with BOTH of the two commands: # The PATH variable echo "$PATH" # The PATH environment variable env | /bin/grep PATH
-
-
www.derstandard.de www.derstandard.de
-
Auch der Standard weist in einem Halbzeitbericht zur COP27 darauf hin, wieviele Vertreter der Fossilindustrien an den Verhandlungen dürfen. Ein Hauptinteresse dabei ist es, durch Regeln zu verhindern, dass die selbst verursachten Emissionen wirksam reduziert werden müssen. Er verweist dabei auf Shells Einfluss bei der Formulierung des Aktikels 6 des Pariser Abkommens.
-
- Aug 2022
-
www.theguardian.com www.theguardian.com
-
“These ads are intended to create a clean warm glow about the companies concerned, giving them more social licence to operate,” said Doug Parr, chief scientist for Greenpeace UK
Die Ausgaben sprechen dafür, dass diese Art von Kommunikation sehr wirksam ist. Auch das schafft eine fundamentale Assymetrie zwischen der Fossilindustrie und ihren Gegnern.
-
-
stackoverflow.com stackoverflow.com
-
$0 would be OK in most cases, some exceptions are, for instance, when the script you're executing is aliased (through alias in .bash_profile). You should really use $BASH_SOURCE variable, instead of $0.
-
Using $0 does not work when the script is run using source script or . script; the name of the script is not available.
-
- Jul 2022
-
stackoverflow.com stackoverflow.com
-
Always use a while read construct: find . -name "*.txt" -print0 | while read -d $'\0' file do …code using "$file" done The loop will execute while the find command is executing. Plus, this command will work even if a file name is returned with whitespace in it. And, you won't overflow your command line buffer.
-
- Apr 2022
-
askubuntu.com askubuntu.com
-
You can close the single quotes before starting the double quotes and do the reverse at the end of that inner section to achieve what you want:
This is how to use variable in single quotes. It works well also for tcsh.
-
-
openwritings.net openwritings.net
-
mpv -playlist <(find "$PWD" -type f)
Tags
Annotators
URL
-
- Mar 2022
-
unix.stackexchange.com unix.stackexchange.com
-
Just let it expand inside an array declaration's right side: list=(../smth*/) # grab the list echo "${#list[@]}" # print array length echo "${list[@]}" # print array elements for file in "${list[@]}"; do echo "$file"; done # loop over the array
-
-
stackoverflow.com stackoverflow.com
-
The short answer is that you want an array: dirs=(/content/{dev01,dev01})
-
- Feb 2022
-
ghedamat.github.io ghedamat.github.io
- Sep 2021
-
github.com github.com
-
I think it's very confusing to overload common executables, such as yarn, in the /bin directory as I often put that bin directory first in my path. Thus, I'd unexpectedly get the bin/yarn rather than my system yarn, which I manage with yvm.
-
-
stackoverflow.com stackoverflow.com
-
One good use for /dev/tty is if you're trying to call an editor in a pipeline (e.g., with xargs). Since the standard input of xargs is some list of files rather than your terminal, just doing, e.g., | xargs emacs will screw up your terminal. Instead you can use | xargs sh -c 'emacs "$@" </dev/tty' emacs to connect the editor to your terminal even though the input of xargs is coming from elsewhere.
-
-
josephsdavid.github.io josephsdavid.github.io
Tags
Annotators
URL
-
- Jun 2021
-
docs.npmjs.com docs.npmjs.com
-
Please make sure that your file(s) referenced in bin starts with #!/usr/bin/env node, otherwise the scripts are started without the node executable!
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
Since looping over the positional parameters is such a common thing to do in scripts, for arg defaults to for arg in "$@". The double-quoted "$@" is special magic that causes each parameter to be used as a single word (or a single loop iteration). It's what you should be using at least 99% of the time.
-
Bash (like all Bourne shells) has a special syntax for referring to the list of positional parameters one at a time, and $* isn't it. Neither is $@. Both of those expand to the list of words in your script's parameters, not to each parameter as a separate word.
-
-
superuser.com superuser.com
-
Instead of using a for loop, which will fail on spaces unless you redefine the IFS variable, I would recommend using a while loop combined with find.
-
-
stackoverflow.com stackoverflow.com
-
Different ways to prepend a line: (echo 'line to prepend';cat file)|sponge file sed -i '1iline to prepend' file # GNU sed -i '' $'1i\\\nline to prepend\n' file # BSD printf %s\\n 0a 'line to prepend' . w|ed -s file perl -pi -e 'print"line to prepend\n"if$.==1' file
-
-
stackoverflow.com stackoverflow.com
-
for cpp_file in *.cpp; do gcc -c $$cpp_file & done; wait This gives much finer control than make -j.
-
-
There is one very important reason for enabling job control to be useful inside scripts: the side-effect it has of placing background processes in their own process groups. This makes it much, much easier to send signels to them and their children with one simple command: kill -<signal> -$pgid. All other ways of dealing with signaling entire trees of processes either involve elaborate (sometimes even recursive) functions, which are often bugnests, or risk killing the parent in the process (no pun intended).
-
-
defragged.org defragged.org
-
askubuntu.com askubuntu.com
-
To avoid the problems with different versions of echo you may want to use printf instead. In contrast to echo printf always interprets \ sequences but doesn't automatically add a linefeed at the end so you have to append \n at the end if you want one.
-
-
-
medium.com medium.com
-
while (( "$#" )); do case "$1" in -a|--my-boolean-flag) MY_FLAG=0 shift ;; -b|--my-flag-with-argument) if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then MY_FLAG_ARG=$2 shift 2 else echo "Error: Argument for $1 is missing" >&2 exit 1 fi ;; -*|--*=) # unsupported flags echo "Error: Unsupported flag $1" >&2 exit 1 ;; *) # preserve positional arguments PARAMS="$PARAMS $1" shift ;; esacdone# set positional arguments in their proper placeeval set -- "$PARAMS"
-
-
unix.stackexchange.com unix.stackexchange.com
-
As a general rule: You should quote everything (that may be quoted).
-
- May 2021
-
github.com github.com
-
For filter-branch, using pipelines like git ls-files | grep -v ... | xargs -r git rm might be a reasonable workaround but can get unwieldy and isn't as straightforward for users; plus those commands are often operating-system specific (can you spot the GNUism in the snippet I provided?)
-
-
github.com github.com
-
However, the place where pip places that package might not be in your $PATH (thus requiring you to manually update your $PATH afterwards), and on windows the pip install might not take care of python-specific issues for you (see "Notes for Windows Users", above). As such, installation via package managers is recommended instead.
-
-
linuxhint.com linuxhint.com
-
-
unix.stackexchange.com unix.stackexchange.com
-
the bullet-proof way to add a path (e.g., ~/opt/bin) to the PATH environment variable is PATH="${PATH:+${PATH}:}~/opt/bin"
-
-
toraritte.github.io toraritte.github.io
-
The command nix-shell will build the dependencies of the specified derivation, but not the derivation itself. It will then start an interactive shell in which all environment variables defined by the derivation path have been set to their corresponding values, and the script $stdenv/setup has been sourced. This is useful for reproducing the environment of a derivation for development.
QUESTION: What exactly does
nix-shell
execute from the Nix expression (i.e.,shell.nix
,default.nix
, etc.)?ANSWER: Based on my current understanding, the answer is everything. It calls
$stdenv/setup
(see annotation below) to set up the most basic environment variables (TODO: expand on this), and "injects" the most common tools (e.g.,gcc
,sed
) into it.It also defines the phases (TODO: verify this) and builder functions, such as
genericBuilder
. For example, the default builder is just two lines:source $stdenv/setup genericBuild
TODO:
pkgs/stdenv/generic/builder.sh
is a mystery though.QUESTION: Once dropping into
nix-shell
, how do I know what phases to execute by looking at adefault.nix
? (E.g.,[..]freeswitch/default.nix
)ANSWER: As far as I can tell, one can override the phases in their Nix build expression (to build the derivation, see at the bottom), but they won't get executed as only the
$stdenv/setup
(see above) will get sourced, and no builders are called that, in return, invoke the phases (again, see above).So if one is using
nix-shell
to create/hack on a package, the person has to manually invoke the builder or phases (TODO: still fuzzy on this subject)
to set up an environment, then one doesn't even have to worry about builders/phases because we just use
nix-shell
to clear the environment and to inject tools that we need for a given task
QUESTION: When dropping into
nix-shell
, is this Nix expression (i.e.,freeswitch/default.nix
) executed? Or just parts of it?ANSWER: As stated above, all of the input Nix expression is evaluated, but no builders and build phases are called; although, nothing prevents one to override the phases, in case they are creating/hacking on a package.
QUESTION:
The command
nix-shell
will build the dependencies of the specified derivation, but not the derivation itself.What is the "derivation" here exactly? I know that it is a build expression, but does that mean the
default.nix
(or other Nix expression)nix-shell
is invoked with?<sup>This statement also seems like a contradiction with how `nix-shell` works (i.e., if one issues `nix-shell -p curl`, then `curl` will be available in that sub-shell), but `-p` acts like a shortcut to as if `curl` had been listed in `buildInputs` so this is not the case.</sup>
ANSWER: I have the feeling my confusion comes from the fact that the term "derivation" is used ambiguously in the manuals, sometimes to mean multiple things (see list below).
TODO: Substantiate this claim, and make sure that it not coming from my misunderstanding certain topics.
Nix build expression (such as
default.nix
) whose output is going to become the store derivation itself (see last item at the bottom about the Nix manual's glossary definition)store derivation.
Had multiple cracks at unambiguously define what a derivation is, and here's a list of these:
What is the purpose of nix-instantiate? What is a store-derivation? (probably the best try yet)
What is a Nix expression in regard to Nix package management? (feels sloppier, but commenter mentions
ATerm
, adding the possibility of making it very specific)Closure vs derivation in the Nix package manager (very short, and will have to be re-written, but adds closures to the mix)
There is now a glossary definition of a derivation in the Nix manual; see this annotation why I find it problematic
QUESTION: What is the difference between
nix-shell -p
andnix-shell
invoked with a Nix expression ofmkShell
(or other that achieves the similar effect)?QUESTION:
nix-shell
does not create a sub-shell, so what does it do? (clarification: sonix-shell
indeed does it; I confused it withnix shell
)
-
- Apr 2021
-
stackoverflow.com stackoverflow.com
-
-
$ ./my_script Will end up in STDOUT(terminal) and /var/log/messages $ tail -n1 /var/log/messages Sep 23 15:54:03 wks056 my_script_tag[11644]: Will end up in STDOUT(terminal) and /var/log/messages
-
-
unix.stackexchange.com unix.stackexchange.com
-
exec &> >(tee -a "$log_file")
-
exec &> >(tee -a "$log_file") echo "This will be logged to the file and to the screen" $log_file will contain the output of the script and any subprocesses, and the output will also be printed to the screen.
-
-
unix.stackexchange.com unix.stackexchange.com
-
-
Write stderr and stdout to a file, display stderr on screen (on stdout) exec 2> >(tee -a -i "$HOME/somefile.log") exec >> "$HOME/somefile.log" Useful for crons, so you can receive errors (and only errors) by mail
-
I just wanted to point out that the syntax is not supported by the POSIX standard and thus won't universally work in /bin/sh scripts (many people erroneously use bash syntax in /bin/sh scripts)
-
exec > >(tee "$HOME/somefile.log") 2>&1
-
-
core.tcl-lang.org core.tcl-lang.org
-
#!/bin/sh # -*- tcl -*- # The next line is executed by /bin/sh, but not tcl \ exec tclsh "$0" ${1+"$@"}
-
-
expect.sourceforge.net expect.sourceforge.net
-
When you have a pipeline, unbuffer must be applied to each element except the last (since that doesn't have its output redirected). Example: unbuffer p1 | unbuffer p2 | unbuffer p3 | p4
-
-
en.wikipedia.org en.wikipedia.org
-
Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services.
-
-
-
empty.sourceforge.net empty.sourceforge.net
-
empty is an utility that provides an interface to execute and/or interact with processes under pseudo-terminal sessions (PTYs). This tool is definitely useful in programming of shell scripts designed to communicate with interactive programs like telnet, ssh, ftp, etc.
-
can be easily invoked directly from shell prompt or script
Can't expect / unbuffer / etc. (whatever this is attempting to contrast itself with) be easily invoked directly from shell prompt or script too??
Okay, I guess you have to know more about how
expect
is invoked to understand what they mean. One glance at the examples, comparing them, and all becomes clear:#!/bin/sh empty -f -i in -o out telnet foo.bar.com empty -w -i out -o in "ogin:" "luser\n"
I didn't realize that expect required/expected (no pun intended) to be used in scripts with its own shebang line:
#!/usr/bin/expect spawn telnet foo.bar.com expect ogin {send luser\r}
That does make it less easy/normal to use expect within a shell script.
I was coming to the expect project from/for the
unbuffer
command, which by contrast, is quite easy to include/use in a shell script -- almost the same asempty
, in fact. (Seems like almost a mismatch to haveunbuffer
command inexpect
toolkit then. Or isexpect
command the only odd one out in that toolkit?) -
does not use TCL, Perl, PHP, Python or anything else as an underlying language is written entirely in C has small and simple source code can easily be ported to almost all UNIX-like systems
-
-
stackoverflow.com stackoverflow.com
-
The quirky looking printf is necessary to correctly expand the script's arguments in $@ while protecting possibly quoted parts of the command (see example below).
-
-
serverfault.com serverfault.com
-
xargs -i sh -c 'test -f {} && echo {}'
-
-
unix.stackexchange.com unix.stackexchange.com
-
If a program receives file names as arguments, don't join them with spaces. Use "$@" to access them one by one.
-
- Mar 2021
-
askubuntu.com askubuntu.com
-
you can use "${@:1}" instead of shift, but that requires bash instead of sh in your #! shebang. IMHO your original shift approach is simpler and better
-
Given the deskopen script, you can use a reference to it as the shebang line in a .desktop file
-
- Feb 2021
-
unix.stackexchange.com unix.stackexchange.com
-
Now this probably won't make difference in the real world (e.g. because the exit codes are not portable and on top of that not always unambiguous as discussed in Default exit code when process is terminated?)
-
-
unix.stackexchange.com unix.stackexchange.com
-
non-interactive shells (actually when job control is not enabled)
-
In any case signal handling in shells is one of the least reliable and portable aspects. You'll find behaviours vary greatly between shells and often between different versions of a same shell. Be prepared for some serious hair pulling and head scratching if you're going to try to do anything non-trivial.
-
for sig in $(kill -l) ; do trap "echo parent:$sig" $sig done
-
-
unix.stackexchange.com unix.stackexchange.com
-
read -rep $'\nDo you wish to stop playing?(y/n)' yn
-
You also need job controlled -monitoring in your parent so it keep track of its children. wait, for example, only works at all with job control. -monitor mode is how shells interact with terminals.
-
-
unix.stackexchange.com unix.stackexchange.com
-
The parentheses always start a subshell. What's happening is that bash detects that sleep 5 is the last command executed by that subshell, so it calls exec instead of fork+exec. The sleep command replaces the subshell in the same process.
-
-
stackoverflow.com stackoverflow.com
-
if the process does not react on a normal kill, you may want to add an additional kill -9 a few seconds afterwards.
-
-
nixos.wiki nixos.wiki
-
example: get an environment which is used to build irssi (also see nix-shell) $ nix-build $NIXPKGS --run-env -A irssi example: get a persistent environment which is used to build irssi $ nix-build $NIXPKGS --run-env -A irssi --add-root
nix-build <path> --run-env
has been superseded bynix-shell
. From Nix manual section C.12. Release 1.6 (2013-09-10):The command
nix-build --run-env
has been renamed tonix-shell
.
-
-
toraritte.github.io toraritte.github.io
-
C.12. Release 1.6 (2013-09-10)In addition to the usual bug fixes, this release has several new features:The command nix-build --run-env has been renamed to nix-shell.
-
- Nov 2020
-
stackoverflow.com stackoverflow.com
-
Never use x && y || z when y can return a non-zero exit status.
-
-
stackoverflow.com stackoverflow.com
-
yell() { echo "$0: $*" >&2; } die() { yell "$*"; exit 111; } try() { "$@" || die "cannot $*"; }
-
If it's closing the "window" likely you're putting the exit # command inside a function, not a script. (In which case use return # instead.)
-
-
mywiki.wooledge.org mywiki.wooledge.org
-
Bash (like all Bourne shells) has a special syntax for referring to the list of positional parameters one at a time, and $* isn't it. Neither is $@. Both of those expand to the list of words in your script's parameters, not to each parameter as a separate word.
-
However, this construct is not completely equivalent to if ... fi in the general case.
The caveat/mistake here is if you treat it / think that it is equivalent to if a then b else c. That is not the case if b has any chance of failing.
-
-
-
-
The potential problem: if second_task fails, third_task will not run, and execution will continue to the next line of code - next_task, in this example. This may be exactly the behavior you want. Alternatively, you may be intending that if second_task fails, the script should immediately exit with its error code. In this case, the best choice is to use a block - i.e., curly braces: first_task && { second_task third_task } next_task Because we are using the -e option, if second_task fails, the script immediately exits.
-
When people write COND && COMMAND, typically they mean "if COND succeeds (or is boolean true), then execute COMMAND. Regardless, proceed to the next line of the script." It's a very convenient shorthand for a full "if/then/fi" clause.
-
-
stackoverflow.com stackoverflow.com
-
[[ -z "$a" || -z "$b" ]] && usage
-
-
blog.csdn.net blog.csdn.net
-
zip -r myfile.zip ./filename
把filename 压缩成 myfile.zip
unzip -d /home/file myfile.zip
把myfile.zip 压缩到 home/file 目录下
zip -d myfile.zip smart.txt
删除 myfile.zip 中的 smart.txt
zip -m myfile.zip add.txt
往 myfile.zip 中加 add.txt
Tags
Annotators
URL
-
-
github.com github.com
-
It starts truncating it's output (shortening strings with ...) once you pipe it's output into grep. That is quite unacceptable. When I am checking if something is inhibited in a script, I should have all possible information available and not have to consider if a string will get truncated when being piped into a tool, that is perfectly readable on a wide terminal.
-
- Oct 2020
-
unix.stackexchange.com unix.stackexchange.com
-
An even more general version that allows using find options:
"find up" command
-
readlink is not part of the standard. A portable script could be implemented with only POSIX shell features.
-
-
stackoverflow.com stackoverflow.com
-
the following seems to do it without the bashism
-
-
www.shellscript.sh www.shellscript.sh
-
Variables - Part 1
变量第一部分
-
-
www.shellscript.sh www.shellscript.sh
-
*
* 应该表示当前文件夹内的文件, 类似于 ls
-
begins with a special symbol: #. This marks the line as a comment
以#开头的代码表示这行代码被注释掉了,这点跟 Python 一致。
-
-
www.shellscript.sh www.shellscript.sh
-
Philosophy
shell 编程的哲学
-
-
www.shellscript.sh www.shellscript.sh
-
Note that to make a file executable, you must set the eXecutable bit, and for a shell script, the Readable bit must also be set:
这句话没懂
-
Shell Scripting Tutorial
shell 编程教程
-
- Aug 2020
-
www.howtogeek.com www.howtogeek.com
-
You can also nest brace expansion lists in the mkdir command. For example, in the articles subdirectory under the htg directory, we want to create two subdirectories called new and rewritten. So, we type the following command at the prompt and press Enter. mkdir -p htg/{articles/{new,rewrites},images,notes,done}
-
- Jul 2020
-
adoptingerlang.org adoptingerlang.org
-
The most commonly supported tool for this is kerl. Kerl is a wrapper around downloading, compiling, and loading various Erlang/OTP versions on a single system, and will abstract away most annoying operations.
Or use the Nix package manager's
nix-shell
.
Tags
Annotators
URL
-
- Jun 2020
-
stackoverflow.com stackoverflow.com
-
{ read foo ; read filesystem size using avail prct mountpoint ; } < <(df -k /)
-
- May 2020
-
stackoverflow.com stackoverflow.com
-
I have used this bash one-liner before set -- "${@:1:$(($#-1))}" It sets the argument list to the current argument list, less the last argument.
Analogue of
shift
built-in. Too bad there isn't just apop
built-in.
-
-
thoughtbot.com thoughtbot.com
- Apr 2020
-
github.com github.com
-
Invert the exit code of a process. Make 0 into 1 and everything else into a 0. An alternative to ! some-command syntax present in some shells.
Tags
Annotators
URL
-
-
stackabuse.com stackabuse.com
-
-
www.cyberciti.biz www.cyberciti.biz
-
Apple replaced Bourne Again SHell with Z shell for licensing reasons
-
-
stackoverflow.com stackoverflow.com
-
And I continue to tell people: Friends don't let friends write bash script.
-
-
riptutorial.com riptutorial.com
-
www.linuxjournal.com www.linuxjournal.com
-
docs.python.org docs.python.org
-
# Add auto-completion and a stored history file of commands to your Python # interactive interpreter. Requires Python 2.0+, readline. Autocomplete is # bound to the Esc key by default (you can change it - see readline docs). # # Store the file in ~/.pystartup, and set an environment variable to point # to it: "export PYTHONSTARTUP=~/.pystartup" in bash. import atexit import os import readline import rlcompleter historyPath = os.path.expanduser("~/.pyhistory") def save_history(historyPath=historyPath): import readline readline.write_history_file(historyPath) if os.path.exists(historyPath): readline.read_history_file(historyPath) atexit.register(save_history) del os, atexit, readline, rlcompleter, save_history, historyPath
Enable history and sane keys in python shell
-
- Feb 2020
-
github.com github.com
-
github.com github.com
-
github.com github.com
-
leimao.github.io leimao.github.io
Tags
Annotators
URL
-
- Jan 2020
-
wilsonmar.github.io wilsonmar.github.io
-
ps f
this doesn't run on my system. However
ps -f
seems to list processes started in the terminal andps -ef
lists all (?) processes
Tags
Annotators
URL
-
-
www.linuxjournal.com www.linuxjournal.com
-
fishshell.com fishshell.com
-
- Dec 2019
-
-
\curl
What is the leading \ for? Is that the same as prefixing it with
command
to ensure no aliases are used?Found answer here: https://hyp.is/1lBLAiHEEeqP7Sd3rqQLxg/rvm.io/rvm/install
-
-
-
Point to be noted is, there is a backslash before curl. This prevents misbehaving if you have aliased it with configuration in your ~/.curlrc file.
-
-
security.stackexchange.com security.stackexchange.com
-
As for exec, I am just using it because it makes sense to run the final command in the same process, replacing the wrapper script instead of spawning a new process. It's not strictly necessary.
-
-
stackoverflow.com stackoverflow.com
-
For those (like me) wondering why is the space needed, man bash has this to say about it: > Note that a negative offset must be separated from the colon by at least one space to avoid being confused with the :- expansion.
-
-
unix.stackexchange.com unix.stackexchange.com
-
Do not start ssh-agent from .bashrc or .zshrc, since these files are executed by each new interactive shell. The place to start ssh-agent is in a session startup file such as .profile or .xsession.
-
- Nov 2019
-
devhints.io devhints.io
- Sep 2019
-
stackoverflow.com stackoverflow.com
-
Open3.capture2e
-
-
unix.stackexchange.com unix.stackexchange.com
- Jul 2019
-
mp.weixin.qq.com mp.weixin.qq.com良许Linux4
-
将错误IP放到数组里面判断是否ping失败三次
#!/bin/bash IP_LIST="192.168.18.1 192.168.1.1 192.168.18.2" for IP in $IP_LIST; do NUM=1 while [ $NUM -le 3 ]; do if ping -c 1 $IP > /dev/null; then echo "$IP Ping is successful." break else # echo "$IP Ping is failure $NUM" FAIL_COUNT[$NUM]=$IP let NUM++ fi done if [ ${#FAIL_COUNT[*]} -eq 3 ];then echo "${FAIL_COUNT[1]} Ping is failure!" unset FAIL_COUNT[*] fi done
-
获取随机8位字符串:
方法1: # echo $RANDOM |md5sum |cut -c 1-8 471b94f2 方法2: # openssl rand -base64 4 vg3BEg== 方法3: # cat /proc/sys/kernel/random/uuid |cut -c 1-8 ed9e032c
-
获取随机8位数字:
方法1:
# echo $RANDOM |cksum |cut -c 1-8 23648321 方法2: # openssl rand -base64 4 |cksum |cut -c 1-8 38571131 方法3: # date +%N |cut -c 1-8 69024815
-
注意事项
1)开头加解释器:#!/bin/bash
2)语法缩进,使用四个空格;多加注释说明。
3)命名建议规则:变量名大写、局部变量小写,函数名小写,名字体现出实际作用。
4)默认变量是全局的,在函数中变量local指定为局部变量,避免污染其他作用域。
5)有两个命令能帮助我调试脚本:set -e 遇到执行非0时退出脚本,set-x 打印执行过程。
6)写脚本一定先测试再到生产上。
Tags
Annotators
URL
-
- Dec 2018
-
discourse.nixos.org discourse.nixos.org
- Oct 2018