YesIKnowIT,
@YesIKnowIT@mastodon.social avatar

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

#Shell #Sed #Linux

milosz,

@YesIKnowIT Slightly different way is to use column command:

column --table --table-right 1 --table-columns-limit 1 --output-width 80 file

milosz,

@YesIKnowIT This was wrong, but as an altenative I have a simpler solution:
cat file | while read -r line; do printf "%${COLUMNS}s" "$line"; done

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