Guest User

Untitled

a guest
Jan 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. ./manipulator [-i]|[-f file1 file2] [-h]
  2.  
  3. This program is a string and numbers manipulator and provides following fuctions:
  4. base1_2_base2 : Converts a number in base1 to appropriate representation in base2
  5. Usage: base1_2_base2 base1 base2 number
  6. base1 = The source base between 2 and 16
  7. base2 = Destination base between 2 and 16
  8. number = The number in base1
  9. Output: Prints the representation of the input number in base2
  10. hexadec_2_bit : Takes a hexadecimal number and checks which bits have been turned ON
  11. Usage: hexadec_2_bit number
  12. number = A hexadecimal number as input
  13. Output: Prints which all bits are switched on among the initial 10 bits
  14. Ignores all the bits after the 10th bit. Bits are numbered from right
  15. Bit-Mapping: 1 1 1 1 1 1 1 1 1 1
  16. J I H G F E D C B A
  17. fibonacci_ser : Takes an number and prints the fibonacci series for that number using recursion
  18. Usage: fibonacci_ser number
  19. number = An integer
  20. Output: The comma seperated fibonacci series corresponding to the input number
  21. reverse_strng : Takes a string and prints that string in reverse order
  22. Usage: reverse_string string
  23. string = Some string which can include special character and alphanumerics
  24. Output: Prints the input string in reverse order
  25. remove_spaces : Takes a string and removes all extra whitespaces (space and TAB characters)
  26. Usage: remove_spaces string
  27. string = Some string with extra whitespaces (space and TAB charcters) in it
  28. Output: Prints the string back with all extra spaces removed
  29. character_frq : Takes a string and prints the character frequency for all the characters in it
  30. Usage: character_frq string
  31. string = Some string
  32. Output: A comma seperated list of character count in the given input string
  33. cipher_string : Takes a string and ciphers it by shifting and rotating characters
  34. Usage: cipher_string shift_int rotate_int string
  35. shift_int: An integer between -9 and 9
  36. A negative integer means shift left and positive means shift right
  37. rotate_int: An integer between -9 and 9
  38. A negative integer means reverse rotation and a postivie means forward rotation
  39. string: Some input alphanumeric string
  40. Output: The ciphered string after shifting and rotations
  41. exit_program_ : Quits the program
  42. Usage: exit_program_
  43.  
  44. The command line arguments accepted for this program are as follows:
  45. -i : To run the program interactively and read the input from stdin
  46. -f file1 file2: To read the program inputs from a file1 and output to file2.
  47. Only one of -i or -f should be used. If both are present it gives preference to interactive mode
  48. -h : To print this help
Add Comment
Please, Sign In to add comment