Reputation: 145
Do you know how to write a command in bash which using "echo" will write all the directories in the current directory, which name does not start with a number one (1) and in the second position in the name has an odd number?
Upvotes: 0
Views: 23
Reputation: 50795
Using a simple glob:
echo [!1][13579]*/
$ ls
1567 1678 1789 1900 2011 2122 2233 2344
$ echo [!1][13579]*/
2122/ 2344/
Upvotes: 1