tripleo, to random
@tripleo@fosstodon.org avatar

All you nutcases still using , what's actually wrong with it?

aka What are the sharp edges?

mjgardner,
@mjgardner@social.sdf.org avatar

@tripleo I would also be remiss not to mention #Perl's included perltrap manual page, which notes both the strict and warnings pragmas and also has nice lists of things for those coming from other #programming languages and tools like #AWK, #C and #CPlusPlus, #JavaScript, #sed, and #shell.

https://perldoc.perl.org/perltrap

linuxgal, to random
@linuxgal@techhub.social avatar

Morse code with #Sed

#!/bin/sed -rf
s/./\U&/
s/$/\nA.-B-...C-.-.D-..E.F..-.G--.H....I..J.---K-.-L.-..M--N-.O---P.--.Q--.-R.-.S...T-U..-V...-W.--X-..-Y-.--Z--../
:a
s/([A-Z])([^\n]
\n.\1([-.]+))/\3 \2/
ta
s/\n.
//

#XF

chmouel, to Bash

Something that served me well over the year, viewing a configuration files without the comment and the newlines with sed:

sed -e '/^#/d' -e '/^$/d' file.conf

so you can see a clean version of all the settings you have set in the file..

#unix #sed #bash #shell

visone, (edited )
@visone@fosstodon.org avatar

@chmouel

I would add this to filter out empty lines

sed -e '/^#/d' -e '/$^/d' -e '/^[[:space:]]*$/d'

#linux #shell #sed

kelidanovus, to linux
@kelidanovus@hachyderm.io avatar

Folks on stack exchange will say “oh it’s real simple using sed“ and then post the most arcane line of undecipherable Deep Magic you’ve ever seen.

xdydx,
@xdydx@mastodon.social avatar

@kelidanovus
I used of my own volition this week and the box is still not smoking! :)

Wuzzy, to random German
@Wuzzy@cyberplace.social avatar

#Lügen der #Geschichte:

Walter Ulbricht (#SED), 15.6.1961: »Niemand hat die Absicht, eine #Mauer zu errichten.«

Bernd Baumann (#AfD), 21.1.2024: »Keiner will deutsche Staatsbürger #abschieben

#Deutschland #Deportation #DDR #NieWieder

Wuzzy,
@Wuzzy@cyberplace.social avatar

The previous toot in #English:

#Lies of #history:

Walter Ulbricht (#SED), 15/6/1961: “Nobody intends to build a wall [the Berlin Wall].”

Bernd Baumann (#AfD), 21/1/2024: “Nobody wants to deport German citizens.”

#Germany #Deportation #GDR #NeverAgain

linuxgal, to linux
@linuxgal@techhub.social avatar

I use my #Linux Jedi light saber (#Vim) to make a #sed script to remove links to the #Mastodon posts I wanna keep. Clock is ticking on everything else. #C42

mjgardner, to programming
@mjgardner@social.sdf.org avatar

@Perl Happy 36th #birthday to the #Perl #programming language!

v1.0 then:
“Perl is kind of designed to make #awk and #sed semi-obsolete […] The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).” https://github.com/Perl/perl5/releases/tag/perl-1.0

v5.38.2 now:
“Perl is […] now used for a wide range of tasks including #SysAdmin, #WebDev, network programming, #GUI development, and more.” https://perldoc.perl.org/perlintro#What-is-Perl%3F

tivasyk, to Bash
@tivasyk@mastodon.social avatar

through all of my sysadmin experience i've been using #sed and avoiding #awk… for some reason. scratch that: for no good reason.

awk is to sed what python is to brainfuck.

the awk programs are a lot more easy to compose and modify, flexible and readable. and there's a brilliant book by the authors — now awailable for a free read from archive.org!

in retrospect, i can't see any tasks that i should have done with sed instead of #bash / awk.

YesIKnowIT, to linux
@YesIKnowIT@mastodon.social avatar

Right-align text on 80 columns:
sed -E ':a /.{80}/!{s/^/ /;ba}' file

#Shell #Sed #Linux

YesIKnowIT, to linux
@YesIKnowIT@mastodon.social avatar

Centering text on 80 columns with stars:
sed -E ':x
s/^.{,80}$/&/
s/^.{,80}$/&
/
tx
' file

#Shell #Sed #Linux

governa, to linux
@governa@fosstodon.org avatar

15 #Sed Command Tips for #Linux System Administration Tasks 🐧

https://www.tecmint.com/linux-sed-command-tips-tricks/

gnemmi, to linux
@gnemmi@mastodon.sdf.org avatar

Im not sure I ever shared this link in here .. but since I always find myself coming back to it, I'll go ahead and share it anyway.

This is the most helpful resource on #sed that I've ever found!

Thank you Mr. Bruce Barnett! 🤗

https://www.grymoire.com/Unix/Sed.html

#RUNBSD #BSD #Linux

Emmaf_77, to random French
@Emmaf_77@piaille.fr avatar

Ma super-kiné m’a donné tout un tas d’exercices à faire chaque jour pour remettre mon épaule.

Je confirme que si j’étais née plus tôt, je serais déjà morte depuis longtemps, vivr la médecine douce! 😊 #maladiechronique #sed

montagnerurale, to random French

Team douleurs chroniques, en passant à Lidl, j'ai vu qu'ils avaient des tas de coussins, tapis, manchons chauffants à des prix relativement modiques
#fibromyalgie
#DouleursChroniques
#SED

j9t, to random
@j9t@mas.to avatar

https://webglossary.info/ is based on a book (“The Web Development Glossary”). Though both book and website use Markdown, I had to write a script that converts everything so that the book can fuel the site. (This works, and automated book–site conversion is pretty cool!)

Working on that script has been weird, some peers suggested to use Node instead, but I—kind of really liked writing it, and enjoyed working quite a bit with #sed!

(Is it just me, or are shell scripts really fun?)

erlendaasland, to tetris

Thanks, @vstinner for introducing me to sed tetris: https://github.com/uuner/sedtris

#sed #tetris #obfuscatedcode

YesIKnowIT, to linux
@YesIKnowIT@mastodon.social avatar

Right-align text on 80 columns:
sed -E ':a /.{80}/!{s/^/ /;ba}' file

#Shell #Sed #Linux

pixelcode, to random
@pixelcode@social.tchncs.de avatar

During the East German uprising of 1953, more than 100 protestors were murdered by russian soldiers and Eastern German police forces or executed before drumhead court-martials. Thousands were imprisoned for demanding free elections and the resignation of the #SED government.

Today, 32 out of 39 members of the Left Party's parliamentary group in the #Bundestag did not attend the parliament's commemoration ceremony on the occasion of 17 June.

The Left Party is an indirect successor to the SED. 🤡

jan_j, to linux German
@jan_j@chaos.social avatar

Okay, ich brauche Hilfe. Ich versuche mit #sed einen Text zu ersetzen, aber ich es funktioniert einfach nicht.
Gesucht: 0.0427 Tc[(10)]
Mein Command:
sed -ir 's/0\.0427 Tc\\(10/XXX/g' temp.pdf
Er will einfach nicht auf diese Klammern match'n.
Was mache ich falsch? [#linux

--- Edit: Gelöst.
sed -ri … (argument-order matters… duh)

apontious, to random
@apontious@dice.camp avatar

Welp. I guess I’m learning fucking #sed

otheorange_tag, to random
@otheorange_tag@mstdn.social avatar

Question for you young whippersnappers, is #YAML at least as much a language as #SED? Does it have some kind of stdin/stdout? looping? Trying to figure out what the next (21st) language to write a gui cloud app calculator in (yes as a matter of fact this DOES mean I did this in SED)

juandesant, to random
@juandesant@astrodon.social avatar

I tend to follow the logic of awk better than the one of sed (not being a vi enthusiast), but it is good to see when one might be better than the other:

https://www.linuxjournal.com/content/text-manipulation-linux-awk-vs-sed

sergio_101, to ChatGPT

for like more than 30 years, i have kinda skirted writing serious #ShellScripts, getting good with #awk and #sed , and getting really good with #LaTeX because it usually meant a TON of digging through old documentation and piecing things together. Recently, i just started asking #chatgpt things like:

How do I flip through a directory of a bazillion zip files, uncompress each one, put the contents on my NAS, and then move those zip files somewhere else for safekeeping?

and learn from the answer

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • osvaldo12
  • cubers
  • rosin
  • Youngstown
  • slotface
  • Durango
  • everett
  • kavyap
  • khanakhh
  • DreamBathrooms
  • megavids
  • ngwrru68w68
  • Leos
  • modclub
  • cisconetworking
  • love
  • GTA5RPClips
  • ethstaker
  • mdbf
  • anitta
  • normalnudes
  • tester
  • tacticalgear
  • JUstTest
  • All magazines