How to replace a specific "word" with value of a variable in unix/sed...etc.?

时间:2015-05-08 10:00:25

标签: unix sed

I'd want to do this:

@-webkit-keyframes rotate {
  from {
    -webkit-transform: rotate(360deg);
  }
  to { 
    -webkit-transform: rotate(0deg);
  }
}
@keyframes rotate {
  from {
    transform: rotate(360deg);
  }
  to { 
    transform: rotate(0deg);
  }
}

.rotating-globe{
    background-image:url(../images/globe.png);
    -webkit-animation: rotate 20s linear infinite 0s;
    animation: rotate 20s linear infinite 0s;
}

I meant to replace all "cellname" words with the value of variable $cell instead of "$cell" text.

ex: $cell = nand4

then after sed, file.txt will contains word "nand4" instead of "cellname"

0 个答案:

没有答案