8000 GitHub - rahilwazir/srn.go: Create new file with replaced strings · GitHub
[go: up one dir, main page]

Skip to content
rahilwazirPublic

About

Create new file with replaced strings

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

srn.go

Create new file with replaced strings

Installation

> git clone https://github.com/rahilwazir/srn.go.git
> cd srn.go
> go build srn.go
> sudo ln -s srn /usr/local/bin/

Usage

Replace keyword google with facebook

> srn /tmp/google.conf google facebook
New file created at: tmp/facebook.conf

Or you can skip second parameter by adding _, which indicates the basename google of file google.conf

> srn /tmp/google.conf _ facebook
New file created at: tmp/facebook.conf

Practicing golang, plus I wanted a tool which can do something similar to this (I know sed but still mmm) because I have to repeat and replace text for my nginx vhost config, now I create vhost easily :D

About

Create new file with replaced strings

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0