
{"id":1698,"date":"2010-06-20T22:45:57","date_gmt":"2010-06-20T17:15:57","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=1698"},"modified":"2010-06-20T22:45:57","modified_gmt":"2010-06-20T17:15:57","slug":"grep-matches-and-that-not-matches-l-l","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/06\/20\/grep-matches-and-that-not-matches-l-l\/","title":{"rendered":"grep &#8230; matches..and that not matches..-l.. -L"},"content":{"rendered":"<pre>\n$grep -r -l tcp_max *\nsysctl_net_ipv4.c\ntcp.c\ntcp_cong.c\ntcp_input.c\ntcp_output.c\n$\n<\/pre>\n<pre>\n$grep -r -L tcp_max *\naf_inet.c\nah4.c\narp.c\ncipso_ipv4.c\ndatagram.c\ndevinet.c\nesp4.c\nfib_frontend.c\nfib_hash.c\nfib_lookup.h\nfib_rules.c\nfib_semantics.c\nfib_trie.c\nicmp.c\nigmp.c\ninet_connection_sock.c\ninet_diag.c\ninet_fragment.c\ninet_hashtables.c\ninet_lro.c\ninetpeer.c\ninet_timewait_sock.c\nipcomp.c\nipconfig.c\nip_forward.c\nip_fragment.c\nip_gre.c\nip_input.c\nipip.c\nipmr.c\nip_options.c\nip_output.c\nip_sockglue.c\nKconfig\nMakefile\nnetfilter\/ipt_ECN.c\nnetfilter\/nf_nat_amanda.c\nnetfilter\/nf_conntrack_l3proto_ipv4.c\nnetfilter\/nf_nat_proto_dccp.c\nnetfilter\/iptable_security.c\nnetfilter\/ipt_ULOG.c\nnetfilter\/ipt_ecn.c\nnetfilter\/ip_tables.c\nnetfilter\/ip_queue.c\nnetfilter\/iptable_filter.c\nnetfilter\/ipt_REJECT.c\nnetfilter\/nf_nat_proto_tcp.c\nnetfilter\/nf_nat_proto_unknown.c\nnetfilter\/nf_defrag_ipv4.c\nnetfilter\/ipt_CLUSTERIP.c\nnetfilter\/nf_nat_ftp.c\nnetfilter\/nf_nat_rule.c\nnetfilter\/nf_nat_sip.c\nnetfilter\/ipt_MASQUERADE.c\nnetfilter\/Kconfig\nnetfilter\/arpt_mangle.c\nnetfilter\/nf_nat_proto_icmp.c\nnetfilter\/nf_nat_snmp_basic.c\nnetfilter\/nf_conntrack_proto_icmp.c\nnetfilter\/nf_nat_standalone.c\nnetfilter\/nf_nat_proto_sctp.c\nnetfilter\/nf_conntrack_l3proto_ipv4_compat.c\nnetfilter\/nf_nat_tftp.c\nnetfilter\/ipt_LOG.c\nnetfilter\/nf_nat_irc.c\nnetfilter\/Makefile\nnetfilter\/nf_nat_h323.c\nnetfilter\/nf_nat_helper.c\nnetfilter\/nf_nat_proto_udp.c\nnetfilter\/ipt_REDIRECT.c\nnetfilter\/arptable_filter.c\nnetfilter\/nf_nat_core.c\nnetfilter\/iptable_mangle.c\nnetfilter\/nf_nat_proto_gre.c\nnetfilter\/ipt_NETMAP.c\nnetfilter\/nf_nat_proto_udplite.c\nnetfilter\/iptable_raw.c\nnetfilter\/ipt_addrtype.c\nnetfilter\/nf_nat_pptp.c\nnetfilter\/nf_nat_proto_common.c\nnetfilter\/ipt_ah.c\nnetfilter\/arp_tables.c\nnetfilter.c\nproc.c\nprotocol.c\nraw.c\nroute.c\nsyncookies.c\ntcp_bic.c\ntcp_cubic.c\ntcp_diag.c\ntcp_highspeed.c\ntcp_htcp.c\ntcp_hybla.c\ntcp_illinois.c\ntcp_ipv4.c\ntcp_lp.c\ntcp_minisocks.c\ntcp_probe.c\ntcp_scalable.c\ntcp_timer.c\ntcp_vegas.c\ntcp_vegas.h\ntcp_veno.c\ntcp_westwood.c\ntcp_yeah.c\ntunnel4.c\nudp.c\nudp_impl.h\nudplite.c\nxfrm4_input.c\nxfrm4_mode_beet.c\nxfrm4_mode_transport.c\nxfrm4_mode_tunnel.c\nxfrm4_output.c\nxfrm4_policy.c\nxfrm4_state.c\nxfrm4_tunnel.c\n$\n<\/pre>\n<p>\n&#8220;-L&#8221;<\/p>\n<p>Suppress  normal  output;  instead print the name of each input file from which no output would normally have been printed.<br \/>\nThe scanning will stop on the first match.<\/p>\n<p><p>\n&#8220;-l&#8221;<\/p>\n<p>Suppress normal output; instead print the name of each input file from which output  would  normally  have  been  printed.<br \/>\n The scanning will stop on the first match.  (-l is specified by POSIX.)\n<\/p>\n<p>source : debian manual for grep.<\/p>\n<pre>\n\nsrc\/cmd\/grep\/main.c\n\n     1: #define EXTERN\n     2: #include        \"grep.h\"\n     3:\n\n     7: {\n      8:         fprint(2, \"usage: grep [-%s] [-f file] [-e expr] [file ...]\\n\", validflags);\n      9:         exits(\"usage\");\n\nhg.pdos.csail.mit.edu\/hg\/plan9 - Lucent - C -\n\n\n<\/pre>\n<pre>\n| Paper |\n\nThe key to problem-solving on the UNIX system\nis to identify the right primitive operations and to\nput them at the right place. UNIX programs tend\nto solve general problems rather than special cas\nes. In a very loose sense, the programs are orth\nogonal,spanning the space of jobs to be done (al\nthough with a fairamount of overlap for reasons\nof history, convenience or efficiency). Functions a\nre placed where they will do the most good: there\nshouldn\u2019t be a pager in every program that produ\nces output any more thanthere should be filename\npattern matching in every program that uses filenames.\n\nOne thing that UNIX does not need\nis more features. It is successful in part because it has a\nsmall number of good ideas that work well together.\nMerely adding features does not make it easier for users\nto do things \u2014 it just makes the manual thicker. The right\nsolution in the right place is always more effective than\nhaphazard hacking.\n\nsource :\nProgram design in the UNIX\u2020 environment\nRob Pike\nBrian W. Kernighan\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$grep -r -l tcp_max * sysctl_net_ipv4.c tcp.c tcp_cong.c tcp_input.c tcp_output.c $ $grep -r -L tcp_max * af_inet.c ah4.c arp.c cipso_ipv4.c datagram.c devinet.c esp4.c fib_frontend.c fib_hash.c fib_lookup.h fib_rules.c fib_semantics.c fib_trie.c icmp.c igmp.c inet_connection_sock.c inet_diag.c inet_fragment.c inet_hashtables.c inet_lro.c inetpeer.c inet_timewait_sock.c ipcomp.c ipconfig.c ip_forward.c ip_fragment.c ip_gre.c ip_input.c ipip.c ipmr.c ip_options.c ip_output.c ip_sockglue.c Kconfig Makefile netfilter\/ipt_ECN.c netfilter\/nf_nat_amanda.c netfilter\/nf_conntrack_l3proto_ipv4.c netfilter\/nf_nat_proto_dccp.c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/06\/20\/grep-matches-and-that-not-matches-l-l\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;grep &#8230; matches..and that not matches..-l.. -L&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[863,867,1035,1098,1181],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/1698"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=1698"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/1698\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=1698"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=1698"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=1698"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}