Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GREP behavior changed?

Featured Replies

Hello all,

I'm really just posting this because I want to see if anyone else has experienced this behavior with grep in unraid. I don't think this is an issue with unraid per se. I have a bash shell script that I have been running for several years without issue. The day after I upgraded to 6.7 the script broke and I had no idea why. After a couple of hours of trouble shooting I discovered the line below, which the output is supposed to be saved to a variable, wasn't grabbing anything. Note: this is not the full line of code...just the part the demonstrates the behavior.

virsh domblklist "domain" --details | grep ^file

If you run this line at the command line in unraid, assuming you are running virtual machines, and replace "domain" with the name of a VM, it should return a line of information on the VM...or so it used to. When I run this now it returns nothing, which caused the variables to never get populated which caused the script to fail. If I drop the caret (regex), it returns what is expected. It appears the grep version changed in 6.7, but I can't find any information concerning any changes to grep that would have caused this behavior. So, I'm curious if anyone else has run across this behavior and maybe more importantly, educate me. It's just one of those little mysteries that causes me to slowly lose my sanity! Thanx!

Edited by _vern_

  • Author

Thank you...I have figured out what has changed. The virsh domblklist --details command output has changed...the line of data now begins with a space so the pattern "^file" no longer matches it. Mystery solved. Thank you for the reply!

It just had to be something like that. Changing the behaviour of grep itself would result in untold chaos. Glad you sorted it. Sanity restored!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.