randomize character substitution
Hi,
If any one help in my issue: I done with executing few commands through telnet session automatically..and my code is executing command one by one without user intervention and shows the execution result. now here what i need is to randomize the commands i.e if i type interactively wrong command then it shows particular error message(execution result here what i above mean it for). but when making automated the script now i want this to be automated i.e i want randomizing the commands execution automated. SOMETHING OUTPUT LIKE: $config/all...actual cmd $config/all....not valid Config?all....not valid CONFIG?ALL..not valid $config\all..not valid I could really appreciate if any one can help on this...and many thanks in advance |
What exactly do you mean by 'randomising'? What you're doing doesn't seem to be particularly random... Could you break down what you want your program to do? Also, what you're trying to do sounds rather strange. Perhaps a better question would be WHY do you want to do this? What are you trying to achieve? Because it sounds like there may be better ways of doing it, whatever it is...
|
I am sorry if my question is little confusing, actually i am new to this scripting language.
As simple as I want to say is: I want any command to be tested with all test cases....so that i can verify the command for all valid and invalid cases likewise we have emailid validation test. |
I'm afraid I'm still finding it difficult to work what exactly you mean by "test cases"... Are you trying to see what happens if a user types a command incorrectly?
|
yes exactly that i need it. I want to to see what happens if a user types a command incorrectly? using expect script
|
Okay, that kinda makes sense :) now, why do you want to write a script for that? If there are no commands with the mis-spelled name, it will say
Code:
bash: foo: command not found |
All times are GMT -5. The time now is 02:36 AM. |