K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / doc / gawk / examples / prog /
server ip : 172.67.156.115

your ip : 172.70.179.71

H O M E


Filename/usr/share/doc/gawk/examples/prog/awksed.awk
Size515
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 09:55
Last modified29-Mar-2012 04:03
Last accessed08-Jul-2025 06:16
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# awksed.awk --- do s/foo/bar/g using just print
# Thanks to Michael Brennan for the idea
#
# Arnold Robbins, [email protected], Public Domain
# August 1995

function usage()
{
print "usage: awksed pat repl [files...]" > "/dev/stderr"
exit 1
}

BEGIN {
# validate arguments
if (ARGC < 3)
usage()

RS = ARGV[1]
ORS = ARGV[2]

# don't use arguments as files
ARGV[1] = ARGV[2] = ""
}

# look ma, no hands!
{
if (RT == "")
printf "%s", $0
else
print
}