Maystyle :
Admin : New post
Guestbook
Local
media
Catergories
Recent Articles
Recent Comments
Recent Trackbacks
Calendar
Tag
Archive
Link
Search
 
  Grepability and space 
작성일시 : 2020. 5. 3. 20:06 | 분류 : Development/Python

In Python, you can put parameters with format "key=value". In this case, you could see there is no space between "=".

At the same time if it is assigning a value to a variable you coud see the space between "=" like "variable = 1".

 

The reason why different using space between "=", is to increase the grepability.

For example if you want to find the line which is calling a method with key=value parameter, you're going to use below command

$grep -nr "key=" .

Otherwise, if you need to find a valiable, you will use below command.

$grep -nr "key =" .

 

|