Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/08/2016 in all areas

  1. 2. лучше так npm install package_name --save-dev иначе 1 способом не скачаешь потом На счёт 3 не знаю.
    1 point
  2. Я немного увлекся :-) У меня вот такое получилось: find . -type f -exec grep -li '<!-- items -->' {} \; | xargs perl rename.pl И сам rename.pl: #!/usr/bin/perl -w use strict; foreach my $filename (@ARGV) { # Skip the script itself next if $filename =~ m/$0$/; # Read open my $FH, "<", $filename or die "Error: $!\n"; my $html = join("", <$FH>); close $FH; # Write open $FH, ">", $filename or die "Error: $!\n"; $html =~ s{<!-- items -->.*?<!-- end items -->}{<!-- items_mark -->}smg; print $FH $html; close $FH; }
    1 point
  3. man grep Флаг -l вероятно? -l, --files-with-matches Only the names of files containing selected lines are written to standard output. grep will only search a file until a match has been found, making searches potentially less expensive. Pathnames are listed once per file searched. If the standard input is searched, the string ``(standard input)'' is written.
    1 point
This leaderboard is set to Kiev/GMT+02:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy