0
私は自分のサイトに200ページを作成したいので、style.cssにいくつかの行を追加したいと思います。ファイルの末尾に以下の行を追加したいstyle.cssに行を追加
.wordpress
width: 100%
position: relative
font-size: 22px
color: #1a1a1a
font-weight: 600
min-height: 297px
line-height: 22px
background: url(../images/wordpress.png) no-repeat left top
スクリプトを使用してファイル名を置き換えたいと思います。誰かが私を導くことができますか?私は以下のトリックを試しましたが、仕事が邪魔になりませんでした。
for i in $(cat list1.txt) ; do echo .$i{\ width: 100%;\ position: relative;\ font-size: 22px;\ color: #1a1a1a;\ font-weight: 600;\ min-height: 297px;\ line-height: 22px;\ background: url(../images/$i.png) no-repeat left top;\} >> list3.txt ; done
これを行う方法はありますか?私はlist1.txtファイルにすべてのファイル名を持っています
をあなたがlist3.txt変更したいですlist1.txtのファイル名?またはファイル名でCSSクラス名を変更したいのですか? –
こんにちはlist1.txtファイルで私はファイル名がありますlilke wordpress.png joomla.png magento.png list3.txtにそれらを追加します。 –
私はlist3.txtにstyle.cssをコピーしました。このスクリプトが動作すれば、私はstyle.cssを更新します –