This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Search for a string in a given array of strings | |
# | |
# Argumnents: | |
# $1: String | required | Defines the query string to search for | |
# $2: String | required | Array of strings to look for the query | |
# | |
# Return: | |
# 0: Success, query string was found | |
# 1: Error, query string was not found or any other error occured |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import array, sys | |
ARGV = sys.argv | |
if len(ARGV) <= 1 or not ARGV[1]: | |
print 'usage: ' + ARGV[0] + ' <string to encode>' | |
sys.exit(1) | |
inp = str(ARGV[1]) | |
bc = '' |
NewerOlder