3
votes
3answers
91 views

Nexenta bash script uses /usr/sun/bin/sed instead of /usr/bin/sed

I'm using a script for Linux and for Solaris (Nexenta). This line works on Linux, but not on solaris (but when run from shell it works): cat "pg_hba.conf" | sed "0,/^local/{s/md5/trust/}" The ...
2
votes
1answer
52 views

What package has GNU sed for Solaris?

I need to use the features of GNU sed, instead of the built-in version under Solaris 10. Which GNU package contains it? I don't see it listed in the coreutils, and my Google searches haven't helped ...
3
votes
2answers
80 views

how to grep complex hierarcy?

I have a file as:- start apple 1 a 2 b 3 c start orange 4 a 5 b start mango 1 a start a/b/c 5 z end 4 b end 6 c end start banana 3 c end 4 d 5 e end I want the output as :- 1 apple/a 2 apple/b 3 ...
2
votes
2answers
147 views

linux & solaris - separate netmask IP's from ordinary IP's

I have file with IP address and netmask IP's my target is to cut the netmask IP's from the file_with_IPs.txt and paste them to another file as file_with_only_netmask_ips.txt remark - netmask IP can ...
-3
votes
4answers
553 views

perl one liner + how to replace any last IP address octets

How to replace any last IP address octets (four octet ) to 0 remark: Implementation should be by Perl one linear on linux machines for example 192.9.200.124 will replaced to 192.9.200.0 ...
1
vote
4answers
4k views

sed/awk/perl - delete spaces between two strings/words + solaris 10

please advice how to delete the spaces between "=" to the value/string ( after the "=" character) , should be implemented by awk or sed or perl command and command must to fit for solaris OS , ( ...
9
votes
2answers
2k views

Using sed to color the output from a command on solaris

I have a ksh script that must work on both linux and solaris. I'm trying to color the output of specific commands. It works on linux (specifically RHEL6), but not on solaris (SunOS 5.10). Command ...
4
votes
2answers
6k views

Sed: Replace N first occurrences of a character

I am looking to replace the 5 first occurences of the whitespace character per line inside a sed script. Here's what I have so far sed -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" -e "s/ /;/" ...