Quantcast
Channel: How to enter foo-* folder without actually using wildcard or shell expansions? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 4 View Live

Answer by kenorb for How to enter foo-* folder without actually using...

You may also try using locate utility, e.g.: updatedb -o ~/tmp.db -l0 -U $PWD; cd $(locate -d ~/tmp.db -l 1 -b -r foo-) For more complex regex pattern check info locate.

View Article



Answer by l0b0 for How to enter foo-* folder without actually using wildcard...

Based on the final requirement you don't need cd; you can do the following: find . -type d -name 'foo-*' -exec make -C {} ';' and find . -type d -name 'foo-*' -exec phing -f {}/build.xml ';' The...

View Article

Answer by G-Man for How to enter foo-* folder without actually using wildcard...

Does drush mung backticks and vertical bars?  If not, you could use cd `ls | grep foo- | head -n 1` If backticks don't work, but |, $, ( and ) do, then you could change the above to cd $(ls | grep foo-...

View Article

How to enter foo-* folder without actually using wildcard or shell expansions?

Short story I'm looking for the command to enter first found foo-something directory like: cd foo-* but without using wildcard (or other special shell characters). Long story As part of the remote...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images