Skip to content

Instantly share code, notes, and snippets.

@cocodrips
Last active August 29, 2015 14:17
Show Gist options
  • Save cocodrips/12d7aa1a1eb1d033a0b3 to your computer and use it in GitHub Desktop.
Save cocodrips/12d7aa1a1eb1d033a0b3 to your computer and use it in GitHub Desktop.
# Shell Question 1. ファイルが与えられます。ファイル中のすべての"."を"。"に置き換えるシェルスクリプトを書いてください。
# hoge.txt: hello, world!...,,,...,.;
sed -i "" "s/\./。/g;" test.txt
# Shell Question 2. /etc/以下のすべての .conf ファイルを列挙してください。
ls -R /etc | grep .conf$
# Shell Question 3. ヘッダつきのCSVファイルが与えられます。ヘッダの行を取り除いたファイルを作ってください。
tail -n +2 hoge.csv > hoge2.csv
# Shell Question 4. あなたはapacheマスターです。/etc/apache2/httpd.conf からすべてのコメント行と空行を削除したファイルを作ってわかりやすくしてください
cat /etc/apache2/httpd.conf | grep -v -p '^\s*#' | grep -v -p '^\s*$'
# Shell Question 5. pythonコマンドがどのディレクトリにインストールされているのか、調べてください。
which python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment