How do I obtain the GNU gsed command in Solaris Unix
Im trying to use the gsed -n '1~4p' command to only print that line which appears every 8 lines, but apparently it can only be done with a GNU sed, but It doesn't seem that I have one, How would I obtain this?
I have been using sed -n '1,${p;n;n;n;}' , Im not sure if it does the same thing but it doesnt perform print my e开发者_Python百科xpected output.
Thanks!
Download and install a version of GNU sed for whichever Solaris version you use.
Source you can build and install is available from ftp://ftp.gnu.org/gnu/sed and depending on the Solaris release you use, prebuilt binary packages may be available with the OS, from the online package repository (for OpenSolaris or Solaris 11), or from a open source packager for older Solaris releases, such as OpenCSW, BlastWave or Sun FreeWare.
精彩评论