Search Results

Search: Posts Made By: jimcanoa
21,408
Posted By jimcanoa
For example in any programming language that...
For example in any programming language that supports pcre: C, perl, python, Ruby... of course every programming language has other ways to check this, for example in python:

>>> s = "axbxc"
>>>...
21,408
Posted By jimcanoa
Scrutinizer: that's very cool, it's better than...
Scrutinizer: that's very cool, it's better than chaining up grep's :) But I would like to do that in a single regexp i.e. without the use of shell tools like grep, awk, sed...
21,408
Posted By jimcanoa
regexp: match string that contains list of chars
Hi,

I'm curious about how to do a very simple thing with regular expressions that I'm unable to figure out.

If I want to find out if a string contains 'a' AND 'b' AND 'c' it can be very easily...
3,414
Posted By jimcanoa
how about cd `ls -rtF|grep '/$'|tail -n1`
how about
cd `ls -rtF|grep '/$'|tail -n1`
8,356
Posted By jimcanoa
How about: $ declare > my_declarations $...
How about:

$ declare > my_declarations
$ bash
$ source my_declarations


I'm not sure that's what you're looking for, but it might work... dunno

*EDIT:
no... don't even bother... declare...
1,945
Posted By jimcanoa
How about this, then: for i in `cat...
How about this, then:

for i in `cat NAME_FILE.TXT`; do size=$((`echo $i|wc -m`-1));dir=$(echo $i|cut -c$size)/$(echo $i|cut -c$(($size-1)),$size ); cp FILE_A.JPG DIR_B/$dir/$i;done


Although...
2,939
Posted By jimcanoa
As far as I know, they may be files, but they...
As far as I know, they may be files, but they aren't *regular* files.

But in any case, do you want to understand the inner workings of the operating system just to satisfy your curiosity, or do...
1,945
Posted By jimcanoa
I'm having trouble understanding exactly what you...
I'm having trouble understanding exactly what you want... but I'll give it a shot...

cd DIR_A
for i in `cat NAME_FILE.TXT`; do dir=DIR_B/`echo $i|cut -c6`/`echo $i|cut -c5,6`; mkdir -p ../$dir;...
10,667
Posted By jimcanoa
What do you mean it's not available? what are you...
What do you mean it's not available? what are you using?

in any case I believe you want maxdepth 1...

find . -maxdepth 1
Showing results 1 to 9 of 9

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