You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

  1. /* Copyright (C) 2000 MySQL AB
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. /*
  13. echo is a replacement for the "echo" command builtin to cmd.exe
  14. on Windows, to get a Unix eqvivalent behaviour when running commands
  15. like:
  16. $> echo "hello" | mysql
  17. The windows "echo" would have sent "hello" to mysql while
  18. Unix echo will send hello without the enclosing hyphens
  19. This is a very advanced high tech program so take care when
  20. you change it and remember to valgrind it before production
  21. use.
  22. */
  23. #include <stdio.h>
  24. int main(int argc, char **argv)
  25. {
  26. int i;
  27. for (i= 1; i < argc; i++)
  28. {
  29. fprintf(stdout, "%s", argv[i]);
  30. if (i < argc - 1)
  31. fprintf(stdout, " ");
  32. }
  33. fprintf(stdout, "\n");
  34. return 0;
  35. }