{"id":549,"date":"2015-07-30T05:45:39","date_gmt":"2015-07-30T01:15:39","guid":{"rendered":"http:\/\/www.chpert.net\/?p=549"},"modified":"2016-03-20T18:01:08","modified_gmt":"2016-03-20T14:31:08","slug":"%d9%85%d8%ab%d8%a7%d9%84%e2%80%8c%d9%87%d8%a7%db%8c%db%8c-%d8%a7%d8%b2-sed","status":"publish","type":"post","link":"https:\/\/pahlevanzadeh.net\/?p=549","title":{"rendered":"\u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u0627\u0632 sed"},"content":{"rendered":"<p>\u0686\u0646\u062f\u06cc\u0646 \u0633\u0627\u0644 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0627\u0632 \u0641\u0631\u0645\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0645\u0628\u0627\u062d\u062b\u06cc \u062f\u0631 \u0632\u0645\u06cc\u0646\u0647 \u0639\u062f\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647  \u0622\u0646\u200c\u0647\u0627 \u0645\u0637\u0631\u062d \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0631\u062d \u0630\u06cc\u0644 \u0644\u06cc\u0633\u062a \u0645\u06cc\u200c\u0634\u0648\u0646\u062f:<\/p>\n<ul>\n<li style=\"margin-right:30px;\">\n<p>\n\u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0642\u062f\u06cc\u0645\u06cc \u0634\u062f\u0647\u200c\u0627\u0646\u062f.<\/p>\n<\/li>\n<li style=\"margin-right:30px;\">\n<p>\n\u0686\u0631\u0627 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646<\/p>\n<\/li>\n<li style=\"margin-right:30px;\">\n<p>\n\u0645\u0628\u0627\u062d\u062b new shell programming \u06a9\u0647 \u062e\u0648\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 \u067e\u0627\u0631\u0627\u062f\u0627\u06cc\u0645 \u0645\u0637\u0631\u062d \u0627\u0633\u062a.<\/p>\n<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>\u0641\u0639\u0644\u0627\u064b \u0628\u0647 \u0647\u0645\u06cc\u0646 \u0645\u0628\u0627\u062d\u062b \u0628\u0627\u0644\u0627 \u0628\u0633\u0646\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u0648 \u0628\u0647 \u0622\u0646\u200c\u0647\u0627 \u062c\u0648\u0627\u0628 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645.<\/p>\n<ul>\n<li style=\"margin-right:30px;\">\n<p>\n\u0634\u0627\u06cc\u062f \u0638\u0627\u0647\u0631 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0642\u062f\u06cc\u0645\u06cc \u0634\u062f\u0647 \u200c\u0628\u0627\u0634\u0646\u062f\u060c \u0648\u0644\u06cc \u06a9\u062f \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0628\u0647 \u0631\u0648\u0632 \u0645\u06cc\u200c\u0628\u0627\u0634\u0646\u062f. \u0648 \u0686\u06cc\u0632\u06cc \u06a9\u0647 \u0645\u0647\u0645 \u0627\u0633\u062a \u06a9\u062f \u0622\u0646\u0647\u0627\u0633\u062a. \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u062f\u0633\u062a\u0648\u0631\u0627\u062a\u060c \u06cc\u06a9\u0633\u0631\u06cc interface \u0645\u06cc\u200c\u0628\u0627\u0634\u0646\u062f.<\/p>\n<\/li>\n<li style=\"margin-right:30px;\">\n<p>\n\u0627\u0635\u0648\u0644\u0627\u064b \u0633\u0648\u06cc\u06cc\u0686 \u06a9\u0631\u062f\u0646 \u0628\u06cc\u0646 \u0635\u0641\u062d\u0647\u200c\u06a9\u0644\u06cc\u062f \u0648 \u0645\u0627\u0648\u0633 \u0633\u0631\u0639\u062a \u0631\u0627 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f \u0648 \u0627\u06cc\u0646 \u0627\u0635\u0644\u060c \u06cc\u06a9\u06cc \u0627\u0632 \u0639\u0645\u062f\u0647 \u062f\u0644\u0627\u06cc\u0644\u06cc\u0633\u062a \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u0632 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0627\u0645\u0627 \u062f\u0644\u0627\u06cc\u0644 \u062f\u06cc\u06af\u0631\u06cc \u0646\u06cc\u0632 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u060c \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0645\u062b\u0627\u0644 \u0641\u0631\u0645\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u062f\u0631 Unix \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06a9\u0647 \u0646\u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0642\u062f\u0631\u062a \u0622\u0646\u200c\u0647\u0627 \u0635\u0631\u0641 \u0646\u0638\u0631 \u06a9\u0631\u062f \u0648 \u0628\u0647 \u0647\u0645\u06cc\u0646 \u062f\u0644\u0627\u06cc\u0644 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0631\u0627 \u062a\u0631\u062c\u06cc\u062d \u0645\u06cc\u200c\u062f\u0647\u0646\u062f.<\/p>\n<\/li>\n<li style=\"margin-right:30px;\">\n<p>\n\u0648\u0627\u0698\u0647 new shell programming \u06a9\u0645\u06cc \u06af\u0646\u06af \u0628\u0647 \u0646\u0638\u0631 \u0645\u06cc\u200c\u0631\u0633\u062f. \u0627\u0645\u0627 \u0628\u062d\u062b\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0686\u0646\u062f \u0633\u0627\u0644\u06cc\u0633\u062a \u0628\u0627\u0628 \u0634\u062f\u0647 \u0648 \u0628\u0647 \u0645\u0628\u0627\u062d\u062b\u06cc \u0647\u0645\u0627\u0646\u0646\u062f customize \u06a9\u0631\u062f\u0646 shell programming \u060c \u0639\u062f\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u0631\u0641\u0646\u062f\u200c\u0647\u0627\u06cc \u0642\u062f\u06cc\u0645\u06cc \u062f\u0631shell programming \u0631\u0627 \u0634\u0627\u0645\u0644 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u0644\u0628\u062a\u0647 \u06a9\u0645\u06cc \u0628\u0627 \u0642\u0633\u0645\u062a \u0627\u0648\u0644 \u062f\u0631 \u0627\u0631\u062a\u0628\u0627\u0637 \u0627\u0633\u062a \u0648 \u0622\u0646 \u0647\u0645 \u0628\u0647\u06cc\u0646\u0647 \u06a9\u0631\u062f\u0646 \u06a9\u062f\u0647\u0627 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<\/p>\n<\/li>\n<\/ul>\n<p style=\"font-size:17px;\">\n<strong>\u0645\u062b\u0627\u0644\u200c\u0647\u0627\u06cc\u06cc \u0627\u0632 \u0641\u0631\u0645\u0627\u0646 sed<\/strong>\n<\/p>\n<p>\u0642\u0631\u0627\u0631 \u0646\u06cc\u0633\u062a \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0641\u0631\u0645\u0627\u0646 sed \u0631\u0648 \u06cc\u0627\u062f \u0628\u062f\u0645\u060c\u200c\u06a9\u0644\u06cc \u0645\u0637\u0644\u0628 \u0648 \u0645\u0631\u062c\u0639 \u062f\u0631 \u0627\u06cc\u0646\u062a\u0631\u0646\u062a \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u0647 \u06a9\u0647 \u0686\u0631\u062e \u0627\u0632 \u0627\u0648\u0644 \u0633\u0627\u062e\u062a\u0646 \u0627\u0633\u062a. \u0627\u06af\u0631 sed \u0645\u06cc\u200c\u062f\u0627\u0646\u06cc\u062f \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0631\u0627 \u0646\u062e\u0648\u0627\u0646\u06cc\u062f \u0648 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0635\u0631\u0641\u0627\u064b \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u0646\u062f\u06af\u0627\u0646 \u062a\u0627\u0632\u0647\u200c\u06a9\u0627\u0631 \u0627\u0633\u062a.<br \/>\n\u0633\u0639\u06cc \u06a9\u0631\u062f\u0645 \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0637\u0644\u0628 \u0686\u0646\u062f\u06cc\u0646 \u0645\u062b\u0627\u0644 \u0628\u06cc\u0627\u0631\u0645 \u062a\u0627 \u0628\u0627 \u0645\u062b\u0627\u0644 \u062e\u0648\u0627\u0646\u0646\u062f\u06af\u0627\u0646 \u0645\u062d\u062a\u0631\u0645 sed \u0631\u0648 \u062f\u0631\u06a9 \u06a9\u0646\u0646\u062f.<br \/>\n\u062e\u06cc\u0644\u06cc \u0627\u0632 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0631\u0627 \u062f\u0631 find \u062d\u0644 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645\u060c \u0628\u0647 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u062f\u0642\u062a \u0641\u0631\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">find . -type f -name \"*road*\" -exec sed -i 's\/foo\/bar\/g' {} +<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0648\u0642\u062a\u06cc \u0627\u0632 exec- \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0646\u0645\u0627\u06cc\u06cc\u0645 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u062e\u0631\u0648\u062c\u06cc find \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0622\u0631\u06af\u0648\u0645\u0627\u0646\u06cc \u06a9\u0647 \u0628\u0647 {} \u0645\u0634\u062e\u0635 \u0645\u06cc\u200c\u0634\u0648\u062f \u0628\u0647 \u0648\u0631\u0648\u062f\u06cc \u06cc\u06a9 \u0641\u0631\u0645\u0627\u0646 \u062f\u0627\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0627\u06af\u0631 \u0627\u0632 i- \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f \u062e\u0631\u0648\u062c\u06cc \u0631\u0627 \u0645\u0633\u062a\u0642\u06cc\u0645\u0627\u064b \u062f\u0631 \u0641\u0627\u06cc\u0644 \u062f\u0631\u062c \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646\u062c\u0627 \u0646\u06cc\u0627\u0632 \u0628\u0648\u062f\u0647 \u0648 \u062f\u0631\u062c \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645. \u0627\u0645\u0627 \u062f\u0631 \u0627\u06a9\u062b\u0631 \u0627\u0648\u0642\u0627\u062a \u062e\u0631\u0648\u062c\u06cc \u062e\u0648\u062f sed \u0631\u0627 \u0628\u0627\u06cc\u062f pipe \u06a9\u0631\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> \u0647\u0631\u062c\u0627 \u0628\u0647 \u0639\u0628\u0627\u0631\u062a foo \u062f\u0631 \u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062f\u0631 \u0622\u0646\u200c\u0647\u0627 road \u0648\u062c\u0648\u062f \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u0646\u062f\u060c \u0622\u0646\u200c\u0647\u0627 \u0631\u0627 \u0628\u0647 bar \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u062f\u0631 \u0647\u0645\u0627\u0646 \u0641\u0627\u06cc\u0644 \u062f\u0631\u062c \u0645\u06cc\u200c\u06a9\u0646\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> + \u0622\u062e\u0631 find \u0646\u0634\u0627\u0646 POSIX \u0628\u0648\u062f\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f\u0646 \u0622\u0646 \u0627\u0633\u062a. Old format \u0622\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$find . -type f -name \"*road*\" -exec sed -i 's\/foo\/bar\/g' {} \\;<\/pre>\n<p>\u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0627\u0632 \u0646\u0648\u0639 \u0627\u0648\u0644 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f\u060c \u0632\u06cc\u0631\u0627 \u062f\u0631 \u0628\u0631\u062e\u06cc \u0639\u0628\u0627\u0631\u0627\u062a \u062f\u0686\u0627\u0631 \u0645\u0634\u06a9\u0644 \u0645\u06cc\u200c\u0634\u0648\u06cc\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647: <\/strong>\u062f\u0631 \u0645\u0648\u0631\u062f \u0641\u0631\u0645\u0627\u0646 find \u062a\u0648\u0635\u06cc\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06cc\u06a9 \u0631\u0627\u0647\u0646\u0645\u0627 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f \u06a9\u0647 \u0647\u0631 \u0631\u0648\u0632\u0647 \u0628\u0647 \u06a9\u0627\u0631\u062a\u0627\u0646 \u0645\u06cc\u0627\u06cc\u062f\u060c \u0645\u0637\u0644\u0628 \u0628\u0639\u062f\u06cc\u0645 \u062f\u0631 \u0645\u0648\u0631\u062f find \u0645\u06cc\u200c\u0628\u0627\u0634\u062f.<br \/>\n\u062e\u06cc\u0644\u06cc \u0627\u0648\u0642\u0627\u062a \u0628\u0627 \u0645\u0634\u06a9\u0644 \u0632\u06cc\u0631 \u062f\u0631 \u0641\u0631\u0645\u0627\u0646 ssh \u0628\u0631\u062e\u0648\u0631\u062f \u06a9\u0631\u062f\u0647\u200c\u0627\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$ ssh mohsen@192.168.0.100\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nIT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!\r\nSomeone could be eavesdropping on you right now (man-in-the-middle attack)!\r\nIt is also possible that the RSA host key has just been changed.\r\nThe fingerprint for the RSA key sent by the remote host is\r\n3f:1b:f4:bd:c5:aa:c1:1f:bf:4e:2e:cf:53:fa:d8:59.\r\nPlease contact your system administrator.\r\nAdd correct host key in \/home\/mohsen\/.ssh\/known_hosts to get rid of this message.\r\nOffending key in \/home\/mohsen\/.ssh\/known_hosts:3\r\nRSA host key for 192.168.0.100 has changed and you have requested strict checking.\r\nHost key verification failed.$<\/pre>\n<p>\u0686\u06cc\u0632\u06cc \u06a9\u0647 \u062f\u0631 \u0628\u0627\u0644\u0627 \u062f\u06cc\u062f\u0647 \u0634\u062f \u0628\u0627 \u06cc\u06a9 \u062f\u0633\u062a\u0648\u0631 sed \u0642\u0627\u0628\u0644 \u062d\u0644 \u0645\u06cc\u200c\u0628\u0627\u0634\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -i -e '3d' ~\/.ssh\/known_hosts<\/pre>\n<p>\u0641\u0631\u0645\u0627\u0646 \u0641\u0648\u0642 \u062e\u0637 \u0633\u0648\u0645 \u0641\u0627\u06cc\u0644 home\/mohsen\/.ssh\/known_hosts\/ \u0631\u0627 \u067e\u0627\u06a9 \u0645\u06cc\u200c\u06a9\u0646\u062f.<br \/>\n<strong>\u0646\u06a9\u062a\u0647:<\/strong> e- \u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a sed \u0631\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0628\u0627 \u06cc\u06a9 sed \u0686\u0646\u062f\u06cc\u0646 e- \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f.<br \/>\n\u062d\u0627\u0644 \u0628\u0627 \u0639\u0645\u0644\u06af\u0631 d \u0622\u0634\u0646\u0627 \u0634\u062f\u06cc\u062f \u0628\u06cc\u0627\u06cc\u06cc\u062f \u06cc\u06a9 \u0633\u0646\u0627\u0631\u06cc\u0648 \u0628\u0627 \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc \u0632\u06cc\u0627\u062f \u0648\u0644\u06cc \u0645\u062a\u063a\u06cc\u0631 \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0646\u06cc\u0645\u060c \u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u0634\u0645\u0627 \u062f\u0627\u062f\u0647\u200c\u0647\u0627\u06cc\u06cc \u062f\u0627\u0631\u06cc\u062f \u06a9\u0647 \u062e\u0637 \u0622\u062e\u0631\u0634 \u0645\u0639\u0644\u0648\u0645 \u0646\u06cc\u0633\u062a \u06a9\u062f\u0627\u0645\u06cc\u0646 \u062e\u0637 \u0627\u0633\u062a. \u0648 \u0627\u0632 \u0637\u0631\u0641\u06cc \u0628\u0627\u06cc\u062f \u062f\u0631 \u06cc\u06a9 Pipe \u0622\u0646 \u062e\u0637 \u0631\u0627 \u0641\u06cc\u0644\u062a\u0631 \u06a9\u0646\u06cc\u062f. \u0628\u0647 \u0641\u0631\u0645\u0627\u0646 \u0632\u06cc\u0631 \u0646\u06af\u0627\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$foo |sed -e '$d' |bar<\/pre>\n<p>\u0648\u0642\u062a\u06cc \u0641\u0631\u0645\u0627\u0646 foo \u06cc\u06a9\u0633\u0631\u06cc \u062f\u0627\u062f\u0647 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0628\u0647 sed \u067e\u0627\u06cc\u067e \u0634\u062f\u0647 \u0648 \u062e\u0637 \u0622\u062e\u0631 \u0622\u0646 \u0627\u0632 \u0628\u06cc\u0646 \u0645\u06cc\u200c\u0631\u0648\u062f \u0648 \u062f\u0633\u062a \u0622\u062e\u0631 \u0628\u0647 bar \u067e\u0627\u06cc\u067e \u0645\u06cc\u200c\u0634\u0648\u062f.<br \/>\n\u0627\u06af\u0631 \u0628\u0647 \u062e\u0627\u0637\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u0641\u0631\u0645\u0627\u0646 tr \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u0633\u062a lowercase \u0631\u0627 \u0628\u0647 uppercase \u0648 \u0628\u0627\u0644\u0639\u06a9\u0633 \u062a\u0628\u062f\u06cc\u0644 \u0646\u0645\u0627\u06cc\u062f. \u0628\u0647 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u062f\u0642\u062a \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$echo 0x34fdf |sed -e '\/0x[0-9a-zA-Z]*\/ y\/abcdef\/ABCDEF\/'<\/pre>\n<p>\u06a9\u0644 \u0633\u0646\u0627\u0631\u06cc\u0648 \u0627\u06cc\u0646\u06af\u0648\u0646\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u06cc\u06a9 \u0639\u062f\u062f \u0647\u06af\u0632\u0627\u062f\u0633\u06cc\u0645\u0627\u0644 \u0631\u0627 \u0628\u0647 \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af \u062a\u0628\u062f\u06cc\u0644 \u0646\u0645\u0627\u06cc\u06cc\u062f. \u062f\u0631\u0633\u062a \u062d\u062f\u0633 \u0632\u062f\u06cc\u062f. \u0639\u0645\u0644\u06af\u0631 y \u06a9\u0627\u0631 \u062a\u0628\u062f\u06cc\u0644 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u200c\u062f\u0647\u062f.<br \/>\n\u062e\u0631\u0648\u062c\u06cc \u0639\u0628\u0627\u0631\u062a \u0628\u0627\u0644\u0627 \u0686\u0646\u06cc\u0646 \u0645\u06cc\u200c\u0634\u0648\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">0x34FDF<\/pre>\n<p>\u0628\u06cc\u0627\u06cc\u06cc\u062f \u06a9\u0645\u06cc \u0641\u0631\u0645\u0627\u0646 \u0641\u0648\u0642 \u0631\u0627 \u062f\u0633\u062a \u06a9\u0627\u0631\u06cc \u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$echo 0x34fdf |sed -e '\/0x[0-9a-zA-Z]*\/ y\/ABCDEF\/abcdef\/'<\/pre>\n<p>\u062f\u0631 \u0645\u0628\u062f\u0644 y \u062c\u0627\u06cc \u062d\u0631\u0648\u0641 \u06a9\u0648\u0686\u06a9 \u0648 \u0628\u0632\u0631\u06af \u0631\u0627 \u0639\u0648\u0636 \u06a9\u0631\u062f\u06cc\u0645 \u0648 \u0646\u062a\u06cc\u062c\u0647 \u0686\u0646\u06cc\u0646 \u0634\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">0x34fdf<\/pre>\n<p>\u0627\u0635\u0648\u0644\u0627\u064b \u062e\u06cc\u0644\u06cc \u0627\u0632 man page \u0647\u0627 \u0628\u0632\u0631\u06af \u0647\u0633\u062a\u0646\u062f \u0648 \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u0631\u0633\u06cc \u0628\u0647 \u0642\u0633\u0645\u062a\u06cc \u0627\u0632 \u0622\u0646\u200c\u0647\u0627 \u0628\u0627\u06cc\u062f scroll down \u0646\u0645\u0648\u062f. \u0628\u0631\u0627\u06cc \u062d\u0644 \u0627\u06cc\u0646 \u0645\u0634\u06a9\u0644 sed \u0628\u0647 \u06a9\u0645\u06a9\u0645\u0627\u0646 \u0645\u06cc\u200c\u0622\u06cc\u062f. \u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u0627\u0632 man page \u0628\u0632\u0631\u06af bash \u06a9\u0647 \u062e\u0648\u062f \u06cc\u06a9 \u06a9\u062a\u0627\u0628 \u0627\u0633\u062a \u0628\u0647 \u0642\u0633\u0645\u062a\u06cc \u062e\u0627\u0635 \u062f\u0633\u062a\u0631\u0633\u06cc \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f\u060c \u0641\u0631\u0636 \u06a9\u0646\u06cc\u062f \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u062f \u0628\u0647 \u0641\u0631\u0645\u0627\u0646 eval \u06a9\u0647 \u06cc\u06a9 \u0641\u0631\u0645\u0627\u0646 built-in \u0627\u0633\u062a \u062f\u0633\u062a\u0631\u0633\u06cc \u067e\u06cc\u062f\u0627 \u06a9\u0646\u06cc\u062f. \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0627\u0632 \u062f\u0633\u062a\u0648\u0631 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0646\u0645\u0627\u06cc\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\"> $man bash | sed -ne '\/^  *eval\/,\/^$\/p'\r\n       eval [arg ...]\r\n              The  args  are  read  and  concatenated  together into a single command.  This command is then read and executed by the shell, and its exit status is returned as the value of eval.  If there are no args, or only null arguments, eval returns 0.<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> n- \u062f\u0631 \u062d\u0627\u0644\u062a silent \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0686\u06cc\u0632\u06cc \u0686\u0627\u067e \u0646\u0645\u06cc\u200c\u06a9\u0646\u062f.<br \/>\n\u0641\u0627\u06cc\u0644\u06cc \u0631\u0627 \u062f\u0631 \u0646\u0638\u0631 \u0628\u06af\u06cc\u0631\u06cc\u062f \u06a9\u0647 \u0645\u062d\u062a\u0648\u06cc\u0627\u062a \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0627\u0631\u0627\u0633\u062a:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">mohsen\r\nali\r\nsoosan\r\nmohsen\r\nsamane\r\nrose\r\nmohsen\r\nsadaf<\/pre>\n<p>\u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f \u062a\u0627 \u062f\u0631 \u062a\u0645\u0627\u0645 \u062e\u0637\u0648\u0637\u06cc \u06a9\u0647 mohsen \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f e \u0631\u0627 \u0628\u0647 o \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0646\u06cc\u062f. \u062f\u0631 \u0646\u0638\u0631 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u062e\u0637\u0648\u0637 \u062f\u06cc\u06af\u0631 \u0647\u0645 e \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -e  '\/mohsen\/s\/e\/o\/g' f1.txt \r\nmohson\r\nali\r\nsoosan\r\nmohson\r\nsamane\r\nrose\r\nmohson\r\nsadaf<\/pre>\n<p><strong>\u0646\u06a9\u062a\u0647:<\/strong> \u062f\u0631\u200c\u0648\u0627\u0642\u0639 \u0642\u0628\u0644 \u0627\u0632 \/s \u06cc\u06a9 pattern \u0628\u0631\u0627\u06cc \u062c\u0633\u062a\u062c\u0648 \u0628\u0647 sed \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645. \u0648 \u0641\u0642\u0637 \u062f\u0631 \u0647\u0645\u0627\u0646 \u062e\u0637\u0648\u0637 \u062a\u063a\u06cc\u06cc\u0631 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f.<br \/>\n\u0641\u0631\u0636 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0634\u0645\u0627\u0631\u0647 \u062e\u0637\u06cc \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0645\u0633\u062a\u0642\u06cc\u0645 \u0628\u0631\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0627\u0631\u0627 \u0647\u0633\u062a\u06cc\u0645. \u0628\u062f\u0648\u0646 \u0645\u0646\u0638\u0648\u0631 \u0628\u0631\u0627\u06cc \u062a\u063a\u06cc\u06cc\u0631 \u062f\u0631 \u062e\u0637 \u0645\u0630\u06a9\u0648\u0631 \u0686\u0646\u06cc\u0646 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -e '3s\/oo\/u\/' f1.txt \r\nmohsen\r\nali\r\nsusan\r\nmohsen\r\nsamane\r\nrose\r\nmohsen\r\nsadaf<\/pre>\n<p>\u0686\u0646\u062f\u06cc\u0646 \u0646\u0648\u0639 \u0622\u062f\u0631\u0633\u200c\u062f\u0647\u06cc \u062f\u0631 sed \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u060c \u0645\u062b\u0627\u0644 \u0642\u0628\u0644 \u06cc\u06a9 \u0646\u0648\u0639 \u0622\u062f\u0631\u0633 \u062f\u0647\u06cc \u0628\u0648\u062f. \u0632\u0645\u0627\u0646\u06cc \u0634\u0645\u0627 \u0646\u06cc\u0627\u0632 \u062f\u0627\u0631\u06cc\u062f \u062a\u0627 \u062f\u0631 \u06cc\u06a9 \u062e\u0637\u060c \u0646\u0647 \u062a\u0639\u062f\u062f \u062e\u0637\u0648\u0637\u060c \u0628\u0647 sed \u0628\u06af\u0648\u06cc\u06cc\u062f \u062a\u0627 \u062a\u063a\u06cc\u06cc\u0631 \u0628\u0631 \u0631\u0648\u06cc \u06a9\u062f\u0627\u0645 match \u0631\u0648\u06cc \u062f\u0647\u062f \u0628\u0647 \u0639\u0628\u0627\u0631\u062a \u0632\u06cc\u0631 \u062f\u0642\u062a \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$echo sasanian |sed -e 's\/s\/m\/2'\r\nsamanian<\/pre>\n<p>\u0628\u0647 sed \u06af\u0641\u062a\u06cc\u0645 \u062a\u0627 \u0628\u0631\u0631\u0648\u06cc \u062f\u0648\u0645\u06cc\u0646 match \u062a\u063a\u06cc\u06cc\u0631 \u0631\u0627 \u0627\u0639\u0645\u0627\u0644 \u06a9\u0646\u06cc\u062f.<br \/>\n\u0648\u0642\u062a\u06cc \u0645\u06cc\u200c\u062e\u0648\u0627\u0647\u06cc\u0645 comment \u0647\u0627\u06cc \u0627\u0648\u0644 \u0647\u0631 \u062e\u0637 (#) \u0631\u0627 \u067e\u0627\u06a9 \u06a9\u0646\u062f \u0628\u0627\u06cc\u062f \u0627\u0632 \u0641\u0631\u0645\u0627\u0646 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -e 's\/^#.\\(.*\\)\/\\1\/'  yourfile<\/pre>\n<p>\u0628\u0627 \u0641\u0631\u0645\u0627\u0646 \u0632\u06cc\u0631 \u0639\u06a9\u0633 \u0641\u0631\u0645\u0627\u0646 \u0628\u0627\u0644\u0627 \u0631\u0627 \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc\u200c\u062f\u0647\u06cc\u0645 \u0648 \u0628\u0631 \u0631\u0648\u06cc \u0647\u0631 \u062e\u0637 comment \u0645\u06cc\u200c\u06af\u0630\u0627\u0631\u06cc\u0645:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -e 's\/^\/#\/' f1.txt \r\n#mohsen\r\n#ali\r\n#soosan\r\n#mohsen\r\n#samane\r\n#rose\r\n#mohsen<\/pre>\n<p>\u0627\u06af\u0631 \u0646\u06cc\u0627\u0632\u0645\u0646\u062f\u06cc\u062f \u0628\u0647 \u0627\u0646\u062a\u0647\u0627\u06cc \u0645\u062a\u0646 \u0686\u06cc\u0632\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f\u060c \u0628\u0627\u06cc\u062f \u0627\u0632 \u0641\u0631\u0645\u0627\u0646 \u0632\u06cc\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<pre class=\"theme:dark-terminal font:liberation-mono font-size:14 nums:false line-height:20 toolbar:2 scroll:true lang:sh decode:true plain:false\">$sed -e \"s\/$\/@\/\" f1.txt \r\nmohsen@\r\nali@\r\nsoosan@\r\nmohsen@\r\nsamane@\r\nrose@\r\nmohsen@\r\nsadaf@<\/pre>\n<p>\u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u062f\u06cc\u062f\u06cc\u062f\u060c @  \u0628\u0647 \u0627\u0646\u062a\u0647\u0627\u06cc \u0647\u0631 \u0645\u062a\u0646 \u0627\u0636\u0627\u0641\u0647 \u0634\u062f.<\/p>\n<p><em>\u0632\u06cc\u0646 \u067e\u0633 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc sed \u0628\u0647 \u062e\u0648\u062f \u062e\u0648\u0627\u0646\u0646\u062f\u0647 \u0645\u062d\u062a\u0631\u0645 \u0648\u0627\u06af\u0630\u0627\u0631\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0645 \u0627\u06cc\u0646 \u0645\u062b\u0627\u0644\u200c\u0647\u0627 \u0645\u0641\u06cc\u062f \u0648\u0627\u0642\u0639 \u0634\u0648\u0646\u062f.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0686\u0646\u062f\u06cc\u0646 \u0633\u0627\u0644 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0627\u0632 \u0641\u0631\u0645\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0645\u0628\u0627\u062d\u062b\u06cc \u062f\u0631 \u0632\u0645\u06cc\u0646\u0647 \u0639\u062f\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0622\u0646\u200c\u0647\u0627 \u0645\u0637\u0631\u062d \u0627\u0633\u062a \u06a9\u0647 \u0628\u0647 \u0634\u0631\u062d \u0630\u06cc\u0644 \u0644\u06cc\u0633\u062a \u0645\u06cc\u200c\u0634\u0648\u0646\u062f: \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631\u0627\u062a \u0642\u062f\u06cc\u0645\u06cc \u0634\u062f\u0647\u200c\u0627\u0646\u062f. \u0686\u0631\u0627 \u062e\u0637 \u0641\u0631\u0645\u0627\u0646 \u0645\u0628\u0627\u062d\u062b new shell programming \u06a9\u0647 \u062e\u0648\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u06cc\u06a9 \u067e\u0627\u0631\u0627\u062f\u0627\u06cc\u0645 \u0645\u0637\u0631\u062d \u0627\u0633\u062a.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110,5,2,111,109],"tags":[171,170,169,144,172],"_links":{"self":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/549"}],"collection":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=549"}],"version-history":[{"count":9,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/549\/revisions"}],"predecessor-version":[{"id":558,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=\/wp\/v2\/posts\/549\/revisions\/558"}],"wp:attachment":[{"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pahlevanzadeh.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}