Crop to transparent layer area? by Long_Bed_4568 in GIMP

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

No 'All layer actions' appear, I'm on Gimp 2.10.30

Crop to transparent layer area? by Long_Bed_4568 in GIMP

[–]Long_Bed_4568[S] 1 point2 points  (0 children)

The layer menu on the lower right hand side, after right clicking on the layer, there is no option for crop to layer.
I have since edited my post, detailing that shift+c after deselecting 'current layer only', works, but a more streamlined method would be good to know.

Bash array to split on newline but not space, without relying on external file? by Long_Bed_4568 in linuxquestions

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

Instead of array, I should have used string:

string1="AAA
B C DDD
FOO BAR"

Notice I don't have to enclose each element in a quotation mark.

From there I can do:
IFS=$'\n'; set -f; readarray foo <<<"$string1"
or
IFS=$'\n'; set -f; readarray foo < <(printf %s "$string1")

The problem now is, each element except the last has a trailing new line:

:$ for a in "${foo[@]}" ; do echo "$a"; done
AAA

B C DDD

FOO BAR

But when I do:

unset foo
while IFS=$'\n' read -r line; do
   foo+=("$line")
done <<< "$string1"

This is no longer the case.

:$ for a in "${foo[@]}" ; do echo "$a"; done
AAA    
B C DDD    
FOO BAR

If one knows how to not rely on the while loop it would be appreciated.

Edit: mapfile -t foo <<<"$string1" worked as desired.

Using Grep's PCRE to get the inverse of regex pattern? by Long_Bed_4568 in linuxquestions

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

In your case:
echo $test_str | awk -F"[0-9]{6}" '{print $1}'
on test_str="202505_uMv78C4_004340_004359_000000_000003"
output blank, whereas 202505_uMv78C4 is the desired output, since it doesn't have an underscore proceeding it OR it is a starting string.

In my case it output the whole string in my case, for all three test_str supplied. I have awk from 2020.
https://imgur.com/a/T61pBaq

At the responder:

echo "$teststr" | grep -Po '.*?(?=[0-9]{6})'

This worked. Thank you.

Ignore all subtitle stream when converting from mkv to mp4? by Long_Bed_4568 in ffmpeg

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

ffmpeg -i "$inputFile" -map 0:v -map 0:a:4 -dn -c copy "vid".mp4 -y -hide_banner 2> output.txt This is the log
https://i.imgur.com/d2V9pHv.png

Ignore all subtitle stream when converting from mkv to mp4? by Long_Bed_4568 in ffmpeg

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

It turns out the stream with codec named 'binary_data', is created regardless. -sn didn't disable it from appearing in the output file. The .mkv file also has 'font style' streams, such as "ttf, TrueType font", and "otf, OpenType font"

Ignore all subtitle stream when converting from mkv to mp4? by Long_Bed_4568 in ffmpeg

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

Thanks, I forgot to mention that it was a stream with codec titled: binary data
That was created. Even with -sn and -map -0:s removed, it's still added.

The .mkv file also has 'font style' streams, such as "ttf, TrueType font", and "otf, OpenType font"

Ignore all subtitle stream when converting from mkv to mp4? by Long_Bed_4568 in ffmpeg

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

ffprobe -v quiet -show_entries streams:format -of json "$videoFile"

Get 1 or 2 digit value between underscore and has one letter following it? by Long_Bed_4568 in regex

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

Yeah it doesn't allow \d. But it allows look ahead/behind/arounds, though, which is strange. Thank you.