{"id":76440,"date":"2024-12-08T01:46:06","date_gmt":"2024-12-08T01:46:06","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=76440"},"modified":"2024-12-08T01:46:07","modified_gmt":"2024-12-08T01:46:07","slug":"linux-sed-cat-cut-examples","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=76440","title":{"rendered":"Linux sed, cat, cut examples"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"403\" src=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=750%2C403\" alt=\"\" class=\"wp-image-76441\" srcset=\"https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=1024%2C550 1024w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=300%2C161 300w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=768%2C412 768w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=1536%2C824 1536w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?resize=750%2C403 750w, https:\/\/i0.wp.com\/bangla.sitestree.com\/wp-content\/uploads\/2024\/12\/image-33.png?w=1908 1908w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">cut -d &#8220;:&#8221; -f 1,3 \/etc\/passwd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">echo $aLine | cut -d &#8220;:&#8221; -f 1,3<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">cat \/etc\/passwd | cut -d &#8220;:&#8221; -f1,3<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cut -d &#8220;:&#8221; -f 1,3 \/etc\/passwd echo $aLine | cut -d &#8220;:&#8221; -f 1,3 cat \/etc\/passwd | cut -d &#8220;:&#8221; -f1,3<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-76440","post","type-post","status-publish","format-standard","hentry","category-root","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":76438,"url":"http:\/\/bangla.sitestree.com\/?p=76438","url_meta":{"origin":76440,"position":0},"title":"Linux: sed: search, replace, delete, print","author":"Sayed","date":"December 8, 2024","format":false,"excerpt":"Word Replace \u00a0sed 's\/root\/amrood\/\u2019 \u00a0sed 's\/root\/amrood\/g\u2019 \u00a0sed 's\/root\/amrood\/' | grep root \u00a0sed 's\/root\/amrood\/g' | grep root cat \/etc\/passwd | sed 's\/root\/\/g' Delete Lines in the Output cat \/etc\/passwd | sed '1, 5d' |more cat \/etc\/passwd | head cat \/etc\/passwd | sed '1d' | head cat \/etc\/passwd | grep 'sh$\u2019 cat\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76382,"url":"http:\/\/bangla.sitestree.com\/?p=76382","url_meta":{"origin":76440,"position":1},"title":"Linux Script: Read Data from User and Show Some Columns","author":"sayedjustetc","date":"November 24, 2024","format":false,"excerpt":"read -p \"Give me some data: \" user_data echo $user_data echo $user_data | cut -d ' ' -f 1,3","rel":"","context":"In &quot;Operating Systems&quot;","block_context":{"text":"Operating Systems","link":"http:\/\/bangla.sitestree.com\/?cat=1968"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9650,"url":"http:\/\/bangla.sitestree.com\/?p=9650","url_meta":{"origin":76440,"position":2},"title":"\u0987\u0989\u09a8\u09bf\u0995\u09cd\u09b8 &#8211; SED \u098f\u09b0 \u09b8\u09be\u09a5\u09c7 \u09b0\u09c7\u0997\u09c1\u09b2\u09be\u09b0 \u098f\u0995\u09cd\u09b8\u09aa\u09cd\u09b0\u09c7\u09b6\u09a8 (Unix &#8211; Regular Expressions with SED)","author":"Author-Check- Article-or-Video","date":"July 9, 2015","format":false,"excerpt":"\u09b0\u09bf\u09a6\u0993\u09df\u09be\u09a8 \u09ac\u09bf\u09a8 \u09b6\u09be\u09ae\u09c0\u09ae \u00a0 \u0986\u099c\u0995\u09c7\u09b0 \u099f\u09bf\u0989\u099f\u09cb\u09b0\u09bf\u09df\u09be\u09b2\u09c7 \u0986\u09ae\u09b0\u09be \u09a6\u09c7\u0996\u09ac \u0995\u09c0\u09ad\u09be\u09ac\u09c7 sed \u09a4\u09c7 \u09b0\u09c7\u0997\u09c1\u09b2\u09be\u09b0 \u098f\u0995\u09cd\u09b8\u09aa\u09cd\u09b0\u09c7\u09b6\u09a8 \u09ac\u09cd\u09af\u09ac\u09b9\u09be\u09b0 \u0995\u09b0\u09be \u09b9\u09df\u0964 \u00a0 \u098f\u09b8\u0987\u09a1\u09bf\u0995\u09c7 \u0987\u09a8\u09ad\u09cb\u0995 \u0995\u09b0\u09be \u09aa\u09be\u0987\u09aa\u09c7\u09b0 \u09ae\u09be\u09a7\u09cd\u09af\u09ae\u09c7 \u098f\u09b8\u0987\u09a1\u09bf\u09a4\u09c7 \u09a1\u09be\u099f\u09be \u09aa\u09cd\u09b0\u09c7\u09b0\u09a3 \u0995\u09b0\u09c7 \u098f\u0995\u09c7 \u0987\u09a8\u09ad\u09cb\u0995 \u0995\u09b0\u09be \u09af\u09be\u09df, $ cat \/etc\/passwd | sed Usage: sed [OPTION]... {script-other-script} [input-file]... \u00a0 \u00a0 -n, --quiet, --silent \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 suppress automatic printing of\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14036,"url":"http:\/\/bangla.sitestree.com\/?p=14036","url_meta":{"origin":76440,"position":3},"title":"Users and Groups management in Linux (Redhat\/CentOS\/Fedora)","author":"Sayed","date":"December 25, 2017","format":false,"excerpt":"Users and Groups management in Linux (Redhat\/CentOS\/Fedora) Target Audience: Technical people who knew or already know (to some extent) - just wanna review Yes, from my history 622 echo \"dec 25th, 2017 - sayed\" \u00a0 User and password related files 623 cat \/etc\/passwd 624 cat \/etc\/shadow 625 cat \/etc\/group 626\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":14027,"url":"http:\/\/bangla.sitestree.com\/?p=14027","url_meta":{"origin":76440,"position":4},"title":"SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux","author":"Sayed","date":"December 24, 2017","format":false,"excerpt":"Experiment with SSH\/SSHD\/OpenSSH in CentOS\/Redhat Linux Yes, from\u00a0 my history (Probably a review for the technical people, who already knew these sometimes in the past) 461 echo \"dec 24th, 2017\" 462 vim \/etc\/ssh\/sshd_config 463 echo \"SSH Related Commands\" 464 scp -> secure copy 465 tscp -> secure copy for windows\u2026","rel":"","context":"In &quot;\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix&quot;","block_context":{"text":"\u09b2\u09bf\u09a8\u09be\u0995\u09cd\u09b8 \u098f\u09ac\u0982 \u0989\u09a8\u09bf\u0995\u09cd\u09b8 \u0964 Linux and Unix","link":"http:\/\/bangla.sitestree.com\/?cat=1231"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25053,"url":"http:\/\/bangla.sitestree.com\/?p=25053","url_meta":{"origin":76440,"position":5},"title":"Misc Linux Commands (CentOS\/Redhat) that you might find useful #Root","author":"Author-Check- Article-or-Video","date":"April 15, 2021","format":false,"excerpt":"1 php -v 2 yum repolist 3 yum repolist | remi 4 yum repolist | grep remi 5 yum repolist | grep ius 6 yum makecache 7 yum update 8 reboot 9 adduser ariro 10 passwd ariro 11 usermod -a -G apache ariro 12 adduser magento 13 passwd magento 14\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=76440"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76440\/revisions"}],"predecessor-version":[{"id":76442,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/76440\/revisions\/76442"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=76440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=76440"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=76440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}