VMware Cloud Community
nbctcp3
Enthusiast
Enthusiast
Jump to solution

Perl Alternative in ESXi 6.5

SW INFO:

-ESXi 6.5

PROBLEMS:
1. I usually clone vm using cli using this method

# cd /vmfs/volumes/datastore1

# mv OldVM NewVM

# cd NewVM

# rename OldVM NewVM *

# perl -pi -e 's/OldVM/NewVM/g' NewVM.vm*

but I can't find on how to install perl in ESXi

?

1. any other alternative to search/replace text inside multiple files in a folder?

tq

0 Kudos
1 Solution

Accepted Solutions
nbctcp3
Enthusiast
Enthusiast
Jump to solution

SOLVED:

text processing - How can I replace a string in a file(s)? - Unix & Linux Stack Exchange

Using sed as stated above

First, we need to replace all filename in the current directory OldVM/NewVM

Second, replace string in all files in current directory OldVM/NewVM

tq

View solution in original post

0 Kudos
1 Reply
nbctcp3
Enthusiast
Enthusiast
Jump to solution

SOLVED:

text processing - How can I replace a string in a file(s)? - Unix & Linux Stack Exchange

Using sed as stated above

First, we need to replace all filename in the current directory OldVM/NewVM

Second, replace string in all files in current directory OldVM/NewVM

tq

0 Kudos