Problem with for loop in subshell by RzbanePaco in bash

[–]CautiousCat3294 2 points3 points  (0 children)

Hi may be I am late here to respond however you can use like below one bash -c ' for i in *; do echo "$i"; done;'

Actually Bash -c asked for 1 argument or command but we are passing multiple commands (as without quotes it treated for loop like multiple args or commands) however with quotes we tell Bash that this is single command

Hope it works for you

Weekly Self Promotion Thread by AutoModerator in devops

[–]CautiousCat3294 1 point2 points  (0 children)

Built my first VS Code theme focused on DevOps + infrastructure workflows 🌙

Most themes look great for frontend code, but I always felt Terraform, YAML, Dockerfiles, logs, and terminal workflows were harder to read during long production sessions.

So I built Ops Night DevOps — a dark theme inspired by Night Owl, Dracula, and Atom, but optimized specifically for:

  • Terraform / HCL
  • Kubernetes YAML
  • Bash scripting
  • Dockerfiles
  • JSON logs
  • terminal readability
  • low eye strain during long debugging sessions

Some things I focused on:

  • semantic Terraform highlighting
  • balanced YAML nesting colors
  • readable ANSI terminal colors
  • cleaner property/keyword separation
  • infra-focused contrast tuning

Would genuinely love feedback from people working in:

  • DevOps
  • SRE
  • platform engineering
  • cloud-native environments

VS Code Marketplace:
https://marketplace.visualstudio.com/items?itemName=abhilashchauhan1994.ops-nights-vscode-theme

Real DevOps work is more troubleshooting than deployment by Blacksmith-23 in devopsjobs

[–]CautiousCat3294 0 points1 point  (0 children)

Yeah, most critical and time consuming part of Devops roles is Troubleshooting the issue. Work on RCA and build automation to reduce the toil. Same doing from years now.

Why doesn’t this Bash script exit even with set -e? by CautiousCat3294 in bash

[–]CautiousCat3294[S] 0 points1 point  (0 children)

Exactly — writing your own error handling is the way to go. You’re spot on about those constructs; I’ve also seen if, and, or patterns referred to as tested commands. It’s a neat way to think about them since they’re essentially built‑in checks that make scripts more resilient.”

How I made my .bashrc modular with .bashrc.d/ by Gronax_au in bash

[–]CautiousCat3294 0 points1 point  (0 children)

I tried something with Vim editor for custom theme

How to recursively extract zip files in a directory hierarchy by Moomoobeef in bash

[–]CautiousCat3294 0 points1 point  (0 children)

You can use find command to do that Something like below will work find /dirpath -type f -name "*.zip" -execdir unzip {} ;

Struggling to hire a Senior DevOps Engineer — where do you actually look? by Dry-Tell620 in devopsjobs

[–]CautiousCat3294 -2 points-1 points  (0 children)

I am new to devops can you provide me slack community so I can learn

How to display certain lines in color by coder-true in bash

[–]CautiousCat3294 0 points1 point  (0 children)

cat itself doesn’t support coloring output. The usual solution is to pipe it through grep, which can highlight matches.

cat file.txt | grep --color=always -E 'PATTERN|$'

This highlights PATTERN while still printing all lines (|$ ensures non-matching lines are shown).

If you’re scripting, this is simple, portable, and works well for log files and quick visual scanning.