Hello List,
I use regex while define RS in gawk, everything is working fine except I don't know the trick to print the original RS, please see if you can help.
source:
Mon Oct line1
line2
line3
Tue Nov line4
line5
Fri Dec line6
line7
statement
gawk 'BEGIN { RS =...
Hello List,
I m trying to print the multiple lines to one base on certain pattern e.g.
Source:
Sun Feb 8 line1
line2
line3
Mon Feb 9 line4
line5
Tue Feb 10 line6
line 7
line 8
Target
Sun Feb 8 line1 line2 line3
Mon Feb 9 line4 line5
Tue Feb 10 line6 line7 line8
I can accomplish this...
Just wandering if there is a easy way in awk to print the 2nd line above the pattern line
abc
def
hij
klm
locate klm to print out def.
Thanks in advance to my favorite AWK list!
Hi folks,
I m wondering how I can tell the link_mode on a Solaris 10 server, seems link_mode, link_speed, link_status are not supported in Solaris 10. Thanks.
/usr/sbin/ndd -get /dev/ce \?
? (read only)
instance (read and write)
adv_autoneg_cap...
Hello list,
Let me explain what I want to do first ...
the goal is to substitute several old values to several new values in a file.
the matrix file records the filename (first column) and the variables need to be substituted
cat vfile.matrix
path1/file1 v_name1 v_name2 v_name3 na v_name5...
Hello all,
I have two files, vfile, venv,
cat vfile
file1 v_name1 v_name2 v_name3 na v_name5 na v_name7
file2 v_name1 na v_name3 na v_name5 v_name6 na
file3 v_name1 v_name2 na na na na na
cat venv
v_name1=v1
v_name2=v2
v_name3=v3
v_name4=v4
v_name5=v5
v_name6=v6
v_name7=v7
want to use awk to...
Hello all,
I have a text file(vfile) that records all the variable names, something like
#cat vfile | head -1
file1 v_name1 v_name2 v_name3
I want to display the value of the variable by querying this file, however, it seems I could not by simplying doing below, need some idea how to...
hello all,
my situation is I used disk druid to mirror the hard disk during the installation(including boot device). what I want to accomplish is to detach the mirror for all hard disks including boot disk without losing any data on it.
what I learned so far is I can stop and remove one hard...
Hi all,
I have a problem when printing a simple html over cgi
in html i can get the image "test_logo.gif" displayed on the screen,
<html>
<body>
<a href="http://www.testweb.net"><img src="test_logo.gif" alt="Test Logo"></a>
</body>
</html>
however in perl/cgi, the image can not be displayed...
Hello all,
I got a problem when changing the httpd path from /usr/local/apache to /usr1/local/apache.
after above switching, when executing httpd it complains
fopen: No such file or directory
httpd: could not open document config file /usr/local/apache/conf/httpd.conf
but web server can be...
Hello all,
for the netgroup configuration with NIS/LDAP
I tried below but it does not work.
/etc/nsswitch.conf
passwd: files compat
passwd_compat: ldap
group: files compat
group_compat: ldap
...
netgroup: ldap
/etc/passwd
+@sysadmin::::::
or
+@sysadmin
defined entries in openldap (works...
Hello all,
There are two default gateways on my host, the one 10.1.1.1 is the one I want to keep, the other one 10.1.100.23, I need to get rid of it, somehow, after manaualy deleted it
route delete default 10.1.100.23
it will be brought up automatically after like 1 to 2 mins, anybody can...
hi I want to get the output only for 2nd field is "partition", can somebody point out what I did wrong? thanks.
[root@box1 tmp]# /sbin/swapon -s
Filename Type Size Used Priority
/dev/sda2 partition 16779884 0 -1
/addswap file 20482943...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.