Search Results

Search: Posts Made By: nezabudka
170
Posted By MadeInGermany
I think you expect rename -> prename as is the...
I think you expect rename -> prename as is the case on Debian. Another one with prename:
prename -n 's/^(CMRLPCR\d{6})_[^_]*/$1/' *.bumOr
prename -n 's/_[^_]*//' CMRLPCR??????_*.bum
The rename...
Forum: Shell Programming and Scripting 13 Hours Ago
99
Posted By vgersh99
how about for starters: echo...
how about for starters:
echo 'https://example.com/live-hls/bla:bob-sd-blabla/playlist.m3u8' | sed 's#.*:\([^-][^-]*\)-.*#\1#'
278
Posted By vbe
To all Please pay attention to what is...
To all
Please pay attention to what is displayed at the top of this discussion: We are awaiting a reply from the O/P any solution posted till then will be hidden

Thanks for your understanding
133
Posted By Scrutinizer
You need to use double quotes, rather than single...
You need to use double quotes, rather than single ones in this case. Shell variables inside single quotes do not get expanded.
278
Posted By vgersh99
it could helpful if you provided a sample...
it could helpful if you provided a sample (simple) file and the description what column(s) need to be extracted.
Also having a sample input AND a desired output would be helpful as well.

Please...
468
Posted By RudiC
A one or two line data sample would be nice. ...
A one or two line data sample would be nice.


The if (...); will do nothing.
The print CONDITION will print an empty entity as the variable is not defined.


Your idea / approach will not...
173
Posted By RavinderSingh13
Hello Nez, Cool; thanks for letting your...
Hello Nez,

Cool; thanks for letting your views , but IMHO why I added that checks in case version is in some other format then it shouldn't have false positive in output.

Thanks,
R. Singh
173
Posted By RavinderSingh13
Regex learning.
Hello All,

I have come across a question from colleague about complex regex, so I written a regex using grep's -P option in PCRE regex. Since its a new learning for me, so thought to share with...
Forum: What is on Your Mind? 1 Week Ago
546
Posted By Neo
Poster of the Year 2019 - Jeroen van Dijke
Today, I am very pleased to announce the Poster of the Year Award, 2019 is Jeroen van Dijke (Scrutinizer (https://www.unix.com/member_modal.php?u=302052697))

Jeroen has been a member of unix.com...
598
Posted By Peasant
Tip: inotify cron
Dear members, moderators and others.

While working on <insert project>, a need has surfaced to watch a directory, and when a file comes, to do appropriate action.
So, i started writing some...
Forum: Shell Programming and Scripting 3 Weeks Ago
235
Posted By MadeInGermany
Really interesting. By definition it is a...
Really interesting. By definition it is a variable modifier that means the LHS must be a variable. Nesting can only be attempted on the RHS that is a string.
Apparently in zsh the LHS can be a...
Forum: Shell Programming and Scripting 3 Weeks Ago
235
Posted By wisecracker
Hi Ravinder... A fun approach but fully...
Hi Ravinder...

A fun approach but fully 'dash' compliant:
Last login: Tue Jan 28 14:17:35 on ttys000
AMIGA:amiga~> dash
AMIGA:\u\w> path="/var/talend/nat/cdc"
AMIGA:\u\w>...
Forum: Shell Programming and Scripting 3 Weeks Ago
235
Posted By RavinderSingh13
Use parameter expansion over a parameter expansion in bash.
Hello All,

Could you please do help me here as I would like to perform parameter expansion in shell over a parameter expansion.

Let's say I have following variable.
...
631
Posted By MadeInGermany
I gave brief explanations as comments in the...
I gave brief explanations as comments in the code.
The following are comprehensive ones:

while condition - do - done
is a loop. The condition is the read command that reads a line from the...
Forum: What is on Your Mind? 3 Weeks Ago
984
Posted By RavinderSingh13
Thanks a TON Neo for giving me this GREAT honor...
Thanks a TON Neo for giving me this GREAT honor :b:, its always an honor to be a member of this GREAT site :b:, whatever I know in scripting/*nix I learnt from this forum/site and whatever way or...
Forum: What is on Your Mind? 3 Weeks Ago
984
Posted By balajesuri
Way to go Ravinder and Victor! You deserve it :)
Way to go Ravinder and Victor! You deserve it :)
Forum: What is on Your Mind? 3 Weeks Ago
984
Posted By hicksd8
Congratulations to both winners. Well deserved.
Congratulations to both winners. Well deserved.
Forum: What is on Your Mind? 3 Weeks Ago
984
Posted By Scrutinizer
Congratulations Victor and Ravinder! Well and...
Congratulations Victor and Ravinder! Well and truly earned, both of you in different, valuable ways. Thank you for your contributions!
Forum: What is on Your Mind? 3 Weeks Ago
984
Posted By Neo
Moderators of the Year 2019 - Ravinder Singh and Victor Berridge
Today, I am very pleased to announce that the Moderator of the Year Award, 2019 has two very deserving winners.

Ravinder Singh (RavinderSingh13) and Victor Berridge (vbe)

Victor (vbe) has...
Forum: Shell Programming and Scripting 4 Weeks Ago
621
Posted By RudiC
In awk, /.../ is (sort of) a regex constant. man...
In awk, /.../ is (sort of) a regex constant. man awk:
So, your expression /$4 ~ "101"/ will try to match exactly this string : $4 ~ "101" - which it won't find in your sample file.
Try
awk -F,...
642
Posted By Neo
Hey nezabudka , Please include the input and...
Hey nezabudka ,

Please include the input and output (strings / text) in your code samples, so we can see exactly your input and outputs.

Keep up the good work and....

Thanks!
Forum: OS X (Apple) 4 Weeks Ago
784
Posted By Neo
Thanks so much for posting these kinds of...
Thanks so much for posting these kinds of projects. I wish everyone would do this, regardless of their skill level. Sharing is the operative word these days.

On a similar note:

In 2020, I...
Forum: OS X (Apple) 4 Weeks Ago
784
Posted By wisecracker
Generate a random number in a fully POSIX compliant shell, 'dash'...
Hi all...
Apologies for any typos, etc...
This took a while but it didn't beat me...

Although there are many methods of generating random numbers in a POSIX shell this uses integer maths and a...
774
Posted By Neo
I not sure that ss is the tool the OP is looking...
I not sure that ss is the tool the OP is looking for.

ss is similar to netstat, giving information on the state of sockets.

However, when the OP asks:



It's not clear to me the OP is...
Forum: Shell Programming and Scripting 4 Weeks Ago
712
Posted By Scrutinizer
Slightly more "traditional" way of doing this: ...
Slightly more "traditional" way of doing this:

for (( i=0; i<${#L1[@]}; i++ ))
do
printf "%s %s\n" "${L1[i]}" "${L2[i%${#L2[@]}]}"
done

or
lenL1=${#L1[@]} lenL2=${#L2[@]}
for (( i=0;...
Showing results 1 to 25 of 308

 

Featured Tech Videos

All times are GMT -4. The time now is 11:48 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy