abstract.sh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting abstract.sh
# 8  
Old 04-04-2012
Quote:
Originally Posted by huaihaizi3
My purpose is just to show that there are always better solutions to perform the tasks if only you can use your imagination as much as possible!
The post here is intended to show some core concepts and skills that we can perform in shell scripting!
Feel free to delete it if you consider it's useless, Neo!Smilie
My note to you is not to post code without explaining the purpose and what you are trying to do. Others made the same comment; and also the moderators made notes to the same effect.

If you have some "great imaginative idea" or point to make, you need to explain your point and not just post some code fragment without explanation as if playing a game. Your comment:

Quote:
A highly abstract function invocation, just enjoy it ,guys!
... provides no explanation of what you are hoping to accomplish.
# 9  
Old 04-04-2012
Sorry,Neo, just delete this post, it's my fault!
# 10  
Old 04-04-2012
POSIX:
Code:
set 0 1 2
for i; do
  for j; do
    for k; do
      printf "%s " "$i$j$k"
    done
    printf "\n"
  done
done

# 11  
Old 04-04-2012
I much prefer Scrutinizer's version because it doesn't use bash extensions. It easy to follow, and does not contain the dreaded eval command. The version in post #1 is one of the worst and most obscure pieces of code I have ever seen.

Might be an accident but the script appears to generate a sequence 0-222 working in number base 3.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Programming

Java Abstract Classes

Can anyone tell me if this is correct when creating classes in Java? public abstract class Animal { public class Point { public int x,y; } public class Animal { protected Point loc; protected String name; protected Random rng; String... (3 Replies)
Discussion started by: totoro125
3 Replies

2. Programming

C++ abstract (singleton) factory implementation...

I want to create an abstract factory template which will allow me to pass in an "ID" for a subclass and return the singleton instance of that class stored in the factory. It'd be easy to adapt for "multi-ton", but for its present use this isn't necessary. The requirements are: - I don't want... (2 Replies)
Discussion started by: DreamWarrior
2 Replies

3. Programming

how abstract class differs in Java and C++?

hello all, i want to know if there is any difference in working and syntax declaration of abstract class in Java and C++. (1 Reply)
Discussion started by: haravivar
1 Replies

4. Programming

Compiling multiple cpp files (abstract factory pattern)

Hi all, I have been working with java for awhile and because of my school projects I needed to switch C++. I tried to implement some patterns in C++ but unfortunately I couldn't. Specifically, I tried to implement abstract factory pattern but since I used separated files (habitual behavior from... (4 Replies)
Discussion started by: SaTYR
4 Replies
Login or Register to Ask a Question