Y Generation
Apps
iPhone/iPad
NPB Statistics NPB Stats and Info
Mac OS X
RulingScreen Chinese Memorization Hey, More Apps will be released!
Contact About Y Generation
&nbps;Home โœˆ๏ธ Travel โšพ Baseball ๐Ÿ›  Tech ๐Ÿ“˜ Language ๐Ÿ‘จ๐Ÿป Politics About Y Generation  ๐Ÿ˜ˆ
  • Travelโœˆ๏ธ
  • Baseballโšพ๏ธ
  • Tech๐Ÿ› 
  • Language๐Ÿ“˜
  • Politics๐Ÿ‘จ๐Ÿป
  • ๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ปTech Note

unix

A collection of 2 posts

๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to replace a string in a file using sed?

According to the answer over Stack Overflow, you must create a temporary file and mv it to the original file. For example: sed -e 'script

According to the answer over Stack Overflow, you must create a temporary file and mv it to the original file.

For example:

sed -e 'script script' index.html > index.html.tmp && mv index.html.tmp index.html

This is pretty daunting... I wish there were any alternatives...

-->
  • Y Generation
1 min read
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to drop all tables in MySQL?

It is simple enough if you don't care about permissions, etc..., which is true of my local test database. mysql -uUSER -p -e "drop dat

It is simple enough if you don't care about permissions, etc..., which is true of my local test database.

mysql -uUSER -p -e "drop database YOUR_DB;"
mysql -uUSER -p -e "create database YOUR_DB;"
mysql -uUSER -p YOUR_DB < SQL_FILE.sql

And now you get a refreshed DB.


If you don't mind getting

-->
  • Y Generation
1 min read
Y Generation © 2021
Latest Posts ๐Ÿ™ˆ๐Ÿ™‰๐Ÿ™Š