Dotfiles for my tiling window manager + terminal workflow.
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.

55 lines
1.3 KiB

  1. alias ll="ls -l"
  2. alias 209="$cd_school/209"
  3. alias 9r="$cd_school/209/mokkar"
  4. alias l4="$cd_school/209/mokkar/lab4"
  5. alias a1="$cd_school/209/mokkar/a1"
  6. # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
  7. alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
  8. mkex() { chmod 700 $1 ; }
  9. ## compilation functions
  10. # compile without running
  11. c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
  12. # compile without running
  13. c9a() {
  14. for file in *; do
  15. if [[ $file = *.c ]]; then
  16. gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
  17. fi
  18. done
  19. }
  20. # compile and run
  21. c9r() { gc9 $1 && ./"${1%.*}.out" ; }
  22. # compile and run with input
  23. c9i() { gc9 $1 && ./"${1%.*}.out" < $2 ; }
  24. # compile and run with input file
  25. run() {
  26. while read line; do
  27. # ./$1.out $line
  28. echo ./$1.out $line
  29. done < $1.in
  30. }
  31. # temp
  32. c4g() {
  33. gcc -Wall -std=gnu99 -g -o greeting.out greeting.c
  34. ./greeting.out "Good morning" "Emmanuel"
  35. }
  36. # compile a1p2 and test with simple case
  37. ca12() {
  38. gcc -Wall -std=gnu99 -g -o validate_sin.out validate_sin.c sin_helpers.c
  39. ./validate_sin.out 810620716
  40. }
  41. # compile a1p1 and test with simple case
  42. ca1() {
  43. gcc -Wall -std=gnu99 -g -o count_large.out count_large.c
  44. # ll | ./count_large.out 4000
  45. ./count_large.out 0 rw------- < ll.txt
  46. }