r_bash – Telegram
bgit - the beginner's git noscript

Hi All. I recently took a bit of time to write up one of my first extensive bash noscripts. This was mainly an educational project for me to teach me a bit of bash, git, groff (first time writing a man page), as well as others.

You can check out the README for a more in depth explanation, but it's basically a bash noscript wrapper around basic git commands with colorized styling and devicons.

I'd be grateful and flattered if anyone tried it out and found it somewhat useful (there are far better more feature filled similar tools out there, but this works for my simple workflow, and perhaps it will work for you).

Constructive Criticism and Feedback is always welcome.

There are two repo links available (github and codeberg):

https://codeberg.org/z3rOR0ne/bgit

https://github.com/tomit4/bgit

https://redd.it/xt40e2
@r_bash
Bash noscript to mail results of ping test - Security Question

Hi all, I am a newbie to Bash noscripting.

I wrote a simple noscript which will ping a host and send an email if the ping test fails.

The bash noscript uses a CURL command for accessing the SMTP server which is on gmail, however, the Google App password used in the CURL command is hard-coded in my bash noscript.

​

#!/bin/bash

sender="myemail@gmail.com"
receiver="myemail@gmail.com"
gapp="xxxxxxxxxpacy"


# read -p "Enter the subject of mail : " sub
sub="Daily Ping Test"


# if ping -c 1 123.45.67.89 &> /dev/null # Host which succeeds ping test
if ping -c 1 9.87.65.43 &> /dev/null # Host which fails ping test

then
body="Ping succeeded, but I still sent an email :)"
echo "Ping succeeded"
else
body="RED ALERT ::: Ping failed to host!"
echo "Ping failed"
fi

# curl command for accessing the smtp server
curl -s --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from $sender \
--mail-rcpt $receiver\
--user $sender:$gapp \
-T <(echo -e "From: ${sender}
To: ${receiver}
Subject:${sub}

${body}")

My question is if this is a bad design practice to hard-code this Google App password and what would be a more secure alternative for sending an email from a bash noscript (Should I host the SMTP server on my local computer instead?) -- Any advice on setting up a SMTP server locally would be appreciated if recommended. I could read in the Google App password, but that won't be useful as the goal is to run this noscript from a CRON job daily (health-checks on the servers).

Thanks in advance!

https://redd.it/xt6d9o
@r_bash
Running ". ~/.bashrc " and "export PATH="$HOME/.local/bin:$PATH" " at every log on

I am a Linux hobbyist and toy around with my raspberry pi at home. Sometime ago I was having issues where when I logged in the shell looked different (lacking colors, which is normal when I ssh into my raspberry pi). Through some troubleshooting I found out that I had to now run " . ~/.bashrc " and " export PATH="$HOME/.local/bin:$PATH" " every time I log in.

I tried adding these commands to my ~/.profile directory with no luck.

What am I doing wrong? Would it help if I posted screenshots?

https://redd.it/xt2imk
@r_bash
Do anyone know why zenity doesn't work under VNC? I'm making a noscript for "proot-ed debian" (although VNC in termux-x11, zenity seems to work)
https://redd.it/xtjr57
@r_bash
Help with a rename pls

When I try to rename all files and subfolders to replace every '_' (underscore) with a '-' (dash), I get a bunch of errors;

find . -type f | rename -v 's//-/g'
Can't rename ./Lifeline/Season
1/LifelineS01E03.mp4 ./Lifeline/Season-1/Lifeline-S01E03.mp4: No such file or directory
Can't rename ./Lifeline/Season
1/LifelineS01E06.mp4 ./Lifeline/Season-1/Lifeline-S01E06.mp4: No such file or directory
Can't rename ./Lifeline/Season
1/LifelineS01E07.mp4 ./Lifeline/Season-1/Lifeline-S01E07.mp4: No such file or directory
Can't rename ./Lifeline/Season
1/LifelineS01E05.mp4 ./Lifeline/Season-1/Lifeline-S01E05.mp4: No such file or directory

When those files obviously do exist, some thing wrong with my syntax?

I can see the problem, it's replacing the \
in the subfolder name with a - which is not what I had intended.
Not sure how to correct this, ?

https://redd.it/xtreyq
@r_bash
Simultaneous up- and download

Not a bash question, but not think it fits somewhat. I'm looking for a tool that lets me start uploading a file while it's being downloaded. The reason is that my uni's server does not allow downloads from the internet, so you have to download data you want to work with to you local machine first and then upload to the server. It would be a large speed up, if the local machine would just sort of act as a router, immediately forwarding the data upon receival. I've searched the internet a little, but wasn't able to find a technique that lets you do this. Does anyone know if someone has coded this up?

https://redd.it/xtspdc
@r_bash
new coder needs help. "montage: command not found"

Hi all,


I'm a newer coder. Basically all the coding I know is in relation to trying to find shortcuts for my analog photography hobby.


About a year ago I pieced together the code below thanks to this tutorial.
Using ImageMagick to Create Contact Sheets (Montage)


montage -verbose -label '%f' -font Helvetica -pointsize 10 -background '#000000' -fill 'gray' -define jpeg:size=200x200 -geometry 200x200+2+2 -auto-orient florida{001..005}.jpg JPG ~/Desktop/florida11.jpg
I used this code successfully numerous times, but its been months since I did last and now it's not working anymore. I believe i have upgrade my OS once since using it last. also, im pretty sure i upgraded to imagemagick 7 and now have deleted that and downloaded imagemagick 6 because i need "legacy commands"
Now when I enter this command into terminal I get "montage: command not found"

It's very possible i missed something simple, so please give me any ideas you can think of, even if they're elementary.


thanks so much!

https://redd.it/xtx179
@r_bash
If then bash statement
https://redd.it/xtzfgd
@r_bash
Wait only a few seconds for a command, then continue to next ?!

Hi,

I have the following noscript:

active_rrus=$(ping -b -c 2 $rru_ip_range 2>/dev/null | grep "seq" | awk '{print $4}' | sed 's/.$//' | sort | uniq)

for rru in $active_rrus
do
rru_cnct.sh $rru >> $rru.txt
done

seq 7 | paste 172*.txt | sed -e "s/\r//g" | expand -t15 > result.txt

cat result.txt

The output from the above is 3 files with different IP addresses, merged into 1 file and its content displayed.

What happens is if any one of the devices is not reachable the noscripts keeps on waiting.

How can I code it to make it not wait more than a few seconds, and move on to the next device.

Thank You

https://redd.it/xub4bj
@r_bash
Bash command not found and bad substitution error

I'm trying to run this ffmpeg bash noscript

#!/bin/bash

MUSIC_FOLDER='audio/'

VIDEO=loop.m4v

RTMP_SERVERS="RTMPLINK"

while true; do
$SRT = find $MUSIC_FOLDER -type f -maxdepth 2 -name "*.srt" | shuf -n 1;
ffmpeg -hide_banner -i $(find -type f -maxdepth 2 -name ${$SRT:-4}) -vn -acodec copy -f mpegts - ;
done | mbuffer -q -c -m 20000k | (ffmpeg -hide_banner \
-stream_loop -1 -i $VIDEO -i $SRT \
-err_detect explode \
-i pipe:0 \
-map 0:v \
-map 1:a \
-pix_fmt yuv420p \
-s 1920x1080 \
-b:v 5000k \
-b:a 256k \
-acodec aac \
-vcodec libx264 \
-preset ultrafast \
-g 60 \
-threads 2 \
-flags +global_header \
-f tee $RTMP_SERVERS)

I keep getting this error:

live.sh: line 11: ${$SRT:-4}: bad substitution
-vn: No such file or directory
live.sh: line 10: =: command not found
live.sh: line 11: ${$SRT:-4}: bad substitution
-vn: No such file or directory
live.sh: line 10: =: command not found
live.sh: line 11: ${$SRT:-4}: bad substitution
-vn: No such file or directory

The idea is to randomly pick an audio and its SRT subnoscript and play them on top of a looping video, the audio and the SRT file have the same name.
I don't know what i'm doing wrong, the syntax seems okay to me, but i'm not good with bash or even ffmpeg so maybe you can see something I couldn't.

https://redd.it/xuff0t
@r_bash
🎂🎂
🎁 Today @r_bash is 2 years old.
🎉 Congratulations! 🎈
Other @reddit2telegram channels powered by @r_channels:
01. @r_chemicalreactiongifs
02. @CrossfitGirlsbackup
03. @lyricalquotes
04. @r_megane
05. @r_embedded
06. @redditshortfilms
07. @r_okbuddybaka
08. @r_libertarian
09. @r_redpillmalayalam
10. @r_SatisfactoryGame
11. @r_war
12. @r_TIHI
13. @r_malazan
14. @r_Damnthatsinteresting
15. @LivestreamFail
16. @r_yakuzagames
17. @r_educationalgifs
18. @rJackSucksAtLife
19. @tyingherhairup
20. @r_algotrading
21. @okbuddyretardd
22. @blackpeopletweets
23. @r_thedivision
24. @r_kratom
25. @r_systemadmin
26. @macappsbackup
27. @SailingX
28. @r_demisexuality
29. @NikonBackup
30. @r_egg_irl
31. @r_opensignups
32. @SkinnyWithAbsbackup
33. @GIFFFs
34. @r_PokemonMasters
35. @r_badcode
36. @r_cricket
37. @odd_takes
38. @FakeHistoryP0RN
39. @r_one_punch_man
40. @JojosBizarreShitposts
41. @DoctorWhumour
42. @r_TrashTaste
43. @reddit_animalsbeingderps
44. @r_moviescirclejerk
45. @r_InternetIsBeautiful
46. @The100backup
47. @r_bakchodi
48. @reddit_trackballs
49. @r_sbubby
50. @sub_eminem
51. @okbuddyretard
52. @InstaReality
53. @r_okbuddyretard
54. @rkolc
55. @r_googleplaydeals
56. @r_memesITA
57. @r_moviequotes
58. @r_BlackMagicFuckery
59. @TiktokHottiez
60. @r_moviesuggestions
61. @mikuichika_nakano
62. @r_gaming
63. @AssholeDesign
64. @bollybng
65. @r_eldenring
66. @r_wireguard
67. @r_fantasy
68. @rnerds
69. @slavelabour
70. @reddit_OSHA
71. @TheyDidTheMath
72. @r_burdurland
73. @r_mapporn
74. @r_CozyPlaces
75. @r_iNoobChannel
76. @hotshotmodels
77. @anime_hot_wallpapers
78. @r_kerala
79. @weirddalle
80. @r_cyberpunk2077
81. @durrmemes
82. @r_technicallythetruth
83. @r_frugalmalefashion
84. @r_vexillologycirclejerk
85. @r_ik_ihe
86. @r_comics
87. @r_theexpanse
88. @r_Otonokizaka
89. @r_zig
90. @EliteDanger0us
91. @whitepeopletweets
92. @r_getmotivated
93. @r_opm
94. @r_Librandu
95. @r_DetroitPistons
96. @Genshin_Impact_reddit
97. @r_minecraft
98. @mash_kyrie
99. @r_thatsinsane
100. @dash_cams
101. @r_SlimeRancher
102. @programmingreddit
103. @r_historicalmemes
104. @r_outrun
105. @r_tamamo
106. @awwnime
107. @cryptoinstantnews2
108. @rcarporn
109. @r_television
110. @rshittymoviedetails
111. @RedditCats
112. @r_desktops
113. @r_ece
114. @r_MaxEstLa
115. @r_Blursedimages
116. @r_photoshopbattles
117. @eye_bleach
118. @r_animalcrossing
119. @r_Tottenham
120. @NFL_reddit
121. @r_dankmemes
122. @Dreamcatcher_reddit
123. @r_thinkpad
124. @r_MiraculousLadybug
125. @animewaifuss
126. @PraiseTheCameraMan
127. @r_technoblade
128. @r_dark_humor
129. @r_fatestaynight
130. @arkotonog
131. @r_me_irl
132. @r_iww
133. @WTF_PICTURES
134. @r_crappyoffbrands
135. @r_goodanimemes
136. @r_thelastairbender
137. @r_SuperModelIndia
138. @r_plsnobulli
139. @r_smugs
140. @rddit
141. @r_beamazed
142. @r_HentaiMemes
143. @r_bangalore
144. @r_hololive
145. @r_vexillology
146. @rtf2memes
147. @r_arma
148. @r_creepyasterisks
149. @IngressPrimeFeedback
150. @footballmanagergames
151. @r_CryptoMoonShot
152. @OldSchoolCool
153. @pythondaily
154. @aesthetic_waifu_wallpapers
155. @r_TikTok_Tits
156. @r_stray
157. @reddit_wtf
158. @NewGreentexts
159. @r_Padres
160. @RedditGames
161. @CallOfDutyWarzone_reddit
162. @r_kcv
163. @r_pinetime
164. @r_privacy
165. @ImaginationExplorer
166. @antimlms
167. @r_bodybuilding
168. @r_thehatedone
169. @r_DeepFriedMemes
170. @r_corgi
171. @mangareddit
172. @r_naruto
173. @MinecraftModded
174. @r_truefilm
175. @r_xxxtentacion
176. @r_sweatypalms
177. @macsetupsbackup
178. @facepalmers
179. @AlternateReality
180. @r_RimWorld
181. @reddit_fashion
182. @r_sciencegeeks
183. @soccer_reddit
184. @FamilyGuyMemes
185. @r_cutelittlefangs
186. @r_okaybuddyhololive
187. @artificialintelligence24x7
188. @r_PoliticalCompassMemes
189. @r_chels
190. @r_oneshot
191. @CringyTiktok
192. @grimdank
193. @r_twinpeaks
194. @r_mildlyinfuriating
195. @r_wheredidthesodago
196. @r_imaginarylandscapes
197. @DragonBallShitposts
198. @AnimeHindiMemes
199. @r_illegallysmolcats
200. @r_devilmaycry
201. @r_araragi
202. @instantkarma_XO
203. @r_coding
204. @okbuddypersona
205. @r_apphookup
206. @r_jailbreak
207. @proceduralgeneration
208. @ShrineOfMiku
209. @chessmemes
210. @r_VirginVsChad
211. @r_php
212. @r_edc
213. @r_tupac
214. @r_Podcasts
215. @rDDLC
216. @r_PuppyLinux
217. @one_piece_topic
218. @r_battlecats
219. @r_WritingPrompts
220. @wutttttttt
221. @AAAAAGGHHHH
222. @r_notinteresting
223. @r_CoolGithubProjects
224. @r_Julia
225. @news_reddit
226. @ThereWasAnAttempt
227. @manpill
228. @food_from_reddit
229. @r_kopyamakarna
230. @GGPoE
231. @r_suggest
232. @ranalog
233. @anime_streetwear
234. @r_Windows
235. @BeautifulFemalesbackup
236. @r_TechSupportGore
237. @r_FreeGamesOnSteam
238. @r_k12sysadmin
239. @r_imgoingtohellforthis
240. @r_traumacore
241. @r_digimon
242. @r_Tipovi
243. @r_space
244. @oddly_satisfy
245. @Awwducational
246. @r_dndgreentext
247. @r_climbingcirclejerk
248. @r_movies2
249. @r_osugame
250. @TerribleFacebookMemes
251. @r_animegifs
252. @r_woooosh
253. @r_linuxmemes
254. @r_weirdcore
255. @r_persona5
256. @animals_telegram
257. @medieval_memes
258. @reddit_all
259. @r_ramen
260. @r_trashpandas
261. @r_ChinaDress
262. @trueoffmychest
263. @r_crappydesign
264. @r_gamingmemes
265. @r_furrypasta
266. @r_ODSP
267. @RedditHistory
268. @r_indiaa
269. @VaporwaveAesthetics
270. @r_shitposters_paradise
271. @programmer_humor
272. @r_HistoryAnimemes
273. @r_proseporn
274. @r_antiwork
275. @RussianIsSoHard
276. @r_rust
277. @rAnimewallpaper
278. @r_Jeles
279. @grndordr
280. @fate_hot
281. @r_marvelunlimited
282. @r_workreform
283. @r_Chargers
284. @r_kgbtr
285. @aapexlegends_game
286. @r_animememe
287. @r_vinesauce
288. @dankscpmemes
289. @trans_memes
290. @indepthstories
291. @iamatotalpieceofshit
292. @r_behindthegifs
293. @musictheorymemes
294. @r_leftistvexillology
295. @dailyfoodporn
296. @r_texans
297. @r_preppers
298. @r_etymology
299. @soccerx
300. @r_listentothis
301. @r_communism
302. @r_indiangaming
303. @WandaVision_reddit
304. @rareinsults
305. @r_crackwatch
306. @r_mechanicalkeyboards
307. @demonslayer_newz
308. @r_adhd
309. @r_indiandankmemes
310. @DankNaruto
311. @r_androidapps
312. @r_talesfromtechsupport
313. @r_neovim
314. @rsoccerbetting
315. @r_BikiniBottomTwitter
316. @r_jokes
317. @r_fpv
318. @r_imaginary_network
319. @bestoftweets
320. @Rattit
321. @r_denmark
322. @redditpiracy
323. @kingKillerChronicle
324. @r_jacksepticeye
325. @r_scp
326. @r_SelfHosted
327. @anime_wallpaper_HQ
328. @r_rallyporn
329. @r_reallifedoodles
330. @r_trackers
331. @r_comedyheaven
332. @reddit_lego
333. @kstxi
334. @reddit_elm
335. @r_HighQualityGifs
336. @r_lua
337. @r_diy
338. @churchoftohsaka
339. @IngressReddit
340. @r_StardewValley
341. @r_houkai3rd
342. @r_stonks
343. @Asus_Tuf
344. @rekabufeed
345. @r_masterhacker
346. @Boku_No_Hero_Academia_Topic
347. @r_blueteamsec
348. @comedynecrophilia
349. @jenkinsci
350. @didntknowiwantedthat
351. @r_atheism
352. @redditart
353. @r_wholesomememes
354. @minimalwallz
355. @r_3dprinting
356. @r_kemonomimi
357. @r_scrubs
358. @ChannelZeroNetwork
359. @r_overwatch
360. @r_raspberry_pi
361. @r_teenagers
362. @prolifetipss
363. @r_FantasyPL
364. @denpasong
365. @r_wallpapers
366. @r_animeirl
367. @r_foxes
368. @r_mildlyvagina
369. @thefalconandthews_reddit
370. @TheVampireDiariesbackup
371. @r_ToolBand
372. @r_cryptocurrency
373. @Unexpected_Reddit
374. @r_buildapcsales
375. @r_udemyfreebies
376. @r_KamenRider
377. @r_aviation
378. @r_memetemplatesofficial
379. @r_creepy
380. @r_PhoenixSC
381. @NatureIsLit
382. @r_HermitCraft
383. @ATBGE
384. @onepunchmansubreddit
385. @r_gtaonline
386. @BrandNewSentence
387. @chessmemesenglish
388. @r_explainmelikeimfive
389. @r_gifs
390. @r_apple
391. @r_furry
392. @R_MildlyPenis
393. @r_dndmemes
394. @rStableDiffusion
395. @r_tiktokthots
396. @r_turkey
397. @r_pubgmobile
398. @Cinema4Dbackup
399. @r_LeagueOfLegends
400. @r_dgb
401. @r_perfecttiming
402. @reddit_whatcouldgowrong
403. @r_propagandaposters
404. @r_lal_salaam
405. @nature_eco
406. @r_wholesome
407. @rmallubabes
408. @r_breadtube
409. @reddit_androiddev
410. @r_progresspics
411. @r_Bloodborne
412. @r_Euroleague
413. @fakealbumcovers
414. @r_marvelstudios
415. @hololive_yuri
416. @r_ilMasseo
417. @r_chodi
418. @r_izlam
419. @notme_irl
420. @rdogelore
421. @r_Showerthoughts
422. @r_WikiLeaks
423. @r_antimeme
424. @UNBGBBIIVCHIDCTIICBG
425. @rdrawing
426. @wallstreetnewsitalia
427. @r_Arabfunny
428. @r_StarWarsLeaks
429. @CosplayReddit
430. @r_zargoryangalaksisi
431. @reddit2telegram
432. @redmeme
433. @datascientology
434. @DetroitBecomeHumanbackup
435. @r_animearmpits
436. @rhyderabad
437. @anime_titties
438. @imaginary_maps
439. @coolguides
440. @hot_models_videos
441. @r_heraldry
442. @reddit_cartoons
443. @r_SwitchHacks
444. @r_00ag9603
445. @r_DataHoarder
446. @r_linux
447. @r_cpp
448. @rnosleep
449. @r_FallGuysGame
450. @r_2meirl4meirl
451. @r_okbuddyrintard
452. @OneTrueMegumin
453. @reddit196
454. @r_kanye
455. @InstaIndia
456. @asiangirlsbeingcute
457. @r_metalmemes
458. @reddit_android
459. @r_econ
460. @r_PlipPlip
461. @reddit_brasil
462. @r_rainbow6
463. @instant_regret
464. @Next_Level_Skills
465. @r_videomemes
466. @r_hearthstone
467. @attack_on_titan_topic
468. @PoliticalHumor
469. @r_emacs
470. @dailygratitudee
471. @r_homeassistant
472. @r_therewasanattempt
473. @minecraft_en
474. @failures_of_capitalism
475. @r_rimesegate
476. @r_abandoned
477. @r_BigAnimeTiddies
478. @r_terraria
479. @r_islam_channel
480. @quotesporn
481. @worldnews_reddit
482. @r_dontdeadopeninside
483. @northkoreanews
484. @r_shitpostcrusaders
485. @r_progmetal
486. @r_Sino
487. @ani_bm
488. @r_vault_hunters
489. @holdmycosmo
490. @Tumblrcontent
491. @r_formuladank
492. @r_sandman
493. @r_nottheonion
494. @r_tfirl
495. @Fgrandorder
496. @r_LiverpoolFC
497. @r_bugbounty
498. @r_invites
499. @r_League_Of_Memes
500. @r_Celebs
501. @r_modelmakers
502. @r_MCFC
503. @r_lifeprotips
504. @legalcatadvice
505. @r_ComedyCemetery
506. @GnarMains
507. @r_AxieInfinity
508. @r_ExpandDong
509. @r_PewdiepieSubmissions
510. @cheerleadersbackup
511. @asexualityonreddit
512. @r_coys
513. @r_Animemes
514. @r_btd6
515. @r_freegamefindings
516. @ImaginaryPics
517. @CanalLixo
518. @catmemes_reddit
519. @r_combatfootage
520. @r_softwaregore
521. @r_fightporn
522. @r_pcmasterrace
523. @r_documentaries
524. @r_ItemShop
525. @r_SISwimsuitGirls
526. @r_gentoo
527. @WhatsWrongWithYourDog
528. @r_wasletztepreis
529. @r_adporn
530. @r_Ferrets
531. @BikiniMoe
532. @stardewvalley_en
533. @r_xboxone
534. @Windows11Group
535. @r_technology
536. @just_hmmm
537. @r_MashuKyrielight
538. @loliconsunite
539. @r_Pony_irl
540. @r_sdarksouls
541. @Chainsaw_Man_Topic
542. @CricketShitpost
543. @r_boxoffice
544. @r_climbing
545. @frontlinegirls
546. @r_unexpectedhamilton
547. @reddit_gif
548. @r_catgifs
549. @g4m3savisos
550. @r_turkeyjerky
551. @r_pornhubcomments
552. @Idiots_In_Cars
553. @r_til
554. @r_radiocontrol
555. @r_simpsonshitpost
556. @r_youtubehaiku
557. @WatchPeopleVim
558. @r_Gintama
559. @r_movieclub
560. @giveaway_gift
561. @r_hackintosh
562. @r_MinecraftMemes
563. @r_thinkpadsforsale
564. @r_wellthatsucks
565. @r_mild
566. @r_engrish
567. @r_holdmybeer
568. @miku_nakano_fandom
569. @uminekoreddit
570. @r_bitcoin
571. @r_greentext
572. @RealRacing3TG
573. @intensememes
574. @memes_Evangelion
575. @reddit_Dota2
576. @ShrineOfNino
577. @r_wow
578. @r_indianmemes
579. @r_channels_tifu
580. @anime_gifs_hub
581. @dailydankmemes
582. @MemeArea
583. @r_bapcsalescanada
584. @r_cursed
585. @r_China_irl
586. @r_nofap
587. @r_bolehland
588. @r_riscv
589. @imaginarylands
590. @r_AskReddit
591. @r_polandball
592. @r_usenet
593. @r_dalle2
594. @redditvideos
595. @loveforlandlords
596. @rickandmorty_en
597. @r_technope
598. @r_nootropics
599. @r_ShitpostXIV
600. @r_52book
601. @r_yesyesyesyesno
602. @r_deepintoutube
603. @r_IKEAhacks
604. @r_sweden
605. @IndiaSocialSubreddit
606. @r_greenandpleasant
607. @OurWorldTWD
608. @r_disneyvacation
609. @cutie_kittycats
610. @Mootivati0n
611. @r_onejob
612. @r_bash
613. @tnomod
614. @r_Ratorix
615. @r_youshouldknow
616. @r_Davie504
617. @streetmoe
618. @r_pics_redux
619. @r_ContraPoints
620. @animemaids_hot
621. @lostbackup
622. @Indiancelebs
623. @r_SuperSentai
624. @Octoberstrike
625. @r_djs
626. @r_catastrophicfailure
627. @r_devops
628. @r_lostgeneration
629. @r_Bertra
630. @r_shittyramen
631. @r_confidentlyincorrect
632. @r_CursedComments
633. @foxgirls_hot
634. @r_PoliticalMemes
635. @subgeniuschurch
636. @r_porn
637. @reddit_facepalm
638. @r_remotejs
639. @r_DaniDev
640. @AllTwitter
641. @r_books
642. @r_formula1
643. @r_fantheories
644. @rdataisbeautiful
645. @r_vim
646. @r_nosafetysmokingfirst
647. @Reddit_NBA
648. @anime_bikini_waifus
649. @rselfie
650. @r_frogs
651. @r_AmongUs
652. @r_Avicii
653. @FitAndNaturalbackup
654. @news756
655. @wallpapers_desktop_mobile
656. @r_dota2
657. @r_Maybe
658. @r_designporn
659. @r_apexlegends
660. @r_valorant
661. @r_Morocco
662. @moonshotcryptos
663. @admeme
664. @r_StarWarsMemes
665. @r_streetwear
666. @r_starterpacks
667. @r_publicfreakout
668. @COMPLETE_ANARCHY
669. @qt_reddit
670. @r_freefolk
671. @harrypotterbackup
672. @r_programmerhumor
673. @r_arknights
674. @EminemMemes
675. @r_evilbuildings
676. @r_piano
677. @r_magiarecord
678. @AzurLane_sub
679. @r_grandorder
680. @r_suicidewatch
681. @r_MadokaMagica
682. @soccermemer
683. @vfxbackup
684. @MoviePosterTG
685. @r_MWII
686. @r_Windows_Redesign
687. @r_WatchPeopleDieInside
688. @r_chemistry
689. @MarbleRacing
690. @r_malaysia
691. @dogecoin_reddit
692. @CallOfDutyMobile_reddit
693. @MSILaptops
694. @reddit_pride
695. @r_kochin
696. @r_mlp
697. @r_Unity3D
698. @sffpc
699. @r_gunners
700. @r_ClashOfClans
Using output from command(s) not as input for the next command(s), but AS the next commands. (For DNS lookups.)

Scenario:

I want to be able to immediately run DNS lookups (`host`) on modified output from another command that generates a list of FQDNs.

I have multiple FQDNs that I'm querying against for the generation of a custom hosts file.

E.g.

~$ ./generatehosts
host1.com
host2.com
host3.com
[...]
host1000.com


What I want to do is from that output get a list of IPs (preferably just to the right of the FQDN) the IPs they're associated with.

I noticed I can use \`sed\` to create:

~$ ./generate
hosts | sed s/^/host /
host host1.com
host host2.com
host host3.com
...
hosts host1000.com

But how do I turn the output into the commands I want to run?


I'm 100% sure there is a less hacky and awful way to do this, but it got me curious if this was even possible.

https://redd.it/xutryz
@r_bash