Search Results

Search: Posts Made By: sumi76
2,963
Posted By sumi76
I was trying to invoke [[ from the command line...
I was trying to invoke [[ from the command line and it seems to work, so it must be something with my script.

> x=B10

> [[ $x = B[0-9][0-9] ]] && echo match || echo no match

> match
...
2,963
Posted By sumi76
Thx for your reply! It is actually just a...
Thx for your reply!

It is actually just a piece of something bigger, the script is not working with boundaries either. I guess the problem is, that bash is not recognizing [[ ]]

I hope there is...
2,963
Posted By sumi76
need help with extended test command
Hi All,

I have a very simple task to do. I want test a string with regex pattern.
Here's the script I want to use:

#!/bin/bash

x=B10

if [[ $x =~ B[0-9]{2} ]]; then
echo match
else...
3,726
Posted By sumi76
OK! Thanks again for your help! Seems that I...
OK!
Thanks again for your help!
Seems that I have a lot to learn :)
3,726
Posted By sumi76
Thanks Scrutinizer! This works. So basically...
Thanks Scrutinizer!

This works. So basically break exits the loop after the first file matching the criteria is found. Is it right? I just want to be sure I understand correctly what the script's...
3,726
Posted By sumi76
Thanks for the quick replies! @gaurav1086:...
Thanks for the quick replies!

@gaurav1086: it works in deed, but I thought there must be a way to get it working with "test"
Actually I want to have a list with all the directories containing...
3,726
Posted By sumi76
Test File for Existence with Whitespaces in Path
Hi Everyone!

I'm quite new to shell scripting so this might be trivial, though 3 days of struggle and search didn't help to solve the problem:

I want to look for files called '*HUN*' in a huge...
Showing results 1 to 7 of 7

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