notes

#shell

2023. 5. 18.
Split string into array

words="hello hello how low?"

array=($words);

for word in "${array[@]}"; do
  echo $word
done
words="hello hello how low?"

array=($words);

for word in "${array[@]}"; do
  echo $word
done
hello
hello
how
low?
hello
hello
how
low?

2020. 8. 16.
chmod

  • chmod +rwx <filename> to add permissions.
  • chmod -rwx <directoryname> to remove permissions.
  • chmod +x <filename> to allow executable permissions.
  • chmod -wx <filename> to take out write and executable permissions.

2020. 8. 2.
symlinks

path 의 alias 라고 생각하면 쉽다.

ln -s /PATH/TO/ORIGINAL /PATH/TO/LINK
ln -s /PATH/TO/ORIGINAL /PATH/TO/LINK