we must firstly use the sort command, because of uniq command process for sequential lines.therefore we use firstly sort command for get the sequential lines. uniq + sort (unsuccesfull)
sort + uniq (successfull)
and with sed
s (substitute) --> s/regexp/replacement/
* --> represent the initial "spaces" of string (between the quotes)
\(.*\) --> 4 --> \(.*\) this strucutes saves the our string (.* is means everything) --> represent '\1' while writes it
and there is a space " "
\(.*\) --> a --> represent '\2' while writes it
finaly we write our values to stdoutp
\2 --> a
and two spaces
\1 --> 4
the following code turns back ticks "`" to new lines "\n". Then, it attempts to grab only a certain section of the output and excludes lines that contain particular patterns...i.e. "ZooLine|echo|opencert".
awk -vs1="\`" '{gsub(s1,"\n",$0)} 1 {print ; if(/NewLine \(\)/,/}/{if(!/NewLine|echo... (3 Replies)
Hi All,
I have a big configuration log where I want to change string "aaa" to "bbb" under
auto-config-policy only right after "deny", "accept" and "hold" strings, nowhere else.
<<<< text >>>>>
auto-config-policy test
deny aaa precedence 4 profile aaa any
deny aaa... (4 Replies)
Hi all, I have a tab separated file, and one of the fields is sub-delimited by colon. The problem is there can be zero to 4 colons within this field. When I try to change colons to tabs the result is a file with a differing number of fields.
I want to go from:
a:b:c:d:e
a:b:c
a:b:c:d:e
a... (4 Replies)
I have an issue with the display resolution under Xfce. The monitor can handle 1024x768, but the screen display is 800x600. The control panel does not allow me to change this.
I also found the file .config/xfce4/xfconf/xfce-perchannel-xml/displays.xml in which I have made changes, but after a... (0 Replies)
Hi all,
In AIX I need to set the below two as of now these are not.
1)Opnoexpn is not set in sendmail.cf
2)Opnovrfy is not set in sendmail.cf
Please let me know the steps to set Opnoexpn and Opnovrfy in sendmail.cf
Thanks and Regards,
Pavankumar (0 Replies)
Possibly this is not even a FreeBSD issue, but a BIOS issue. Upon installation of FreeBSD, the time is set using the standard feature of selecting a time zone. Some installations are correctly set to the current time, but others are either one or two hours off. So the time is read from the time... (0 Replies)
I've installed Solaris 8, but didn't quite give it the correct (machine) time.
Think the machine is out of sync.
Can I change that afterwards or do I have to do another install right from the beginning? (1 Reply)
Hi!
I have for example a script/file:
+1 echo "toto"
+2 echo "abcdef
+3 echo "dqmsl" $r "dsqlfj"
+4 cat titi | tr \t' ';'
+5 exit
---------------------------------------
I try to find a solution who say:
<ERROR>
The character " has been forgotten a the line 2
The character... (7 Replies)