লিনাক্সে এক্সপোর্ট কমান্ড কী করার কথা?
লিনাক্সে এক্সপোর্ট কমান্ড কী করার কথা?
উত্তর:
আচরণটি প্রদর্শনের জন্য এখানে একটি উদাহরণ।
$ # set testvar to be a value
$ testvar=asdf
$ # demonstrate that it is set in the current shell
$ echo $testvar
$ # create a bash subprocess and examine the environment.
$ bash -c "export | grep 'testvar'"
$ bash -c 'echo $testvar'
$ # export testvar and set it to the a value of foo
$ export testvar=foo
$ # create a bash subprocess and examine the environment.
$ bash -c "export | grep 'testvar'"
declare -x testvar="foo"
$ bash -c 'echo $testvar'
foo
$ # mark testvar to not be exported
$ export -n testvar
$ bash -c "export | grep 'testvar'"
$ bash -c 'echo $testvar'
আপনি লক্ষ্য করবেন যে exportআপনার তৈরি করা নতুন ব্যাশ প্রক্রিয়াটি দেখতে সক্ষম ছিল না testvar। কখন testvarরফতানি করা হয়েছিল, নতুন প্রক্রিয়াটি দেখতে সক্ষম হয়েছিল testvar।
পরিবেশের পরিবর্তনশীল হিসাবে শেল ভেরিয়েবল রফতানি করুন।
manপৃষ্ঠাটি চেষ্টা করেছেন ? ss64.com/bash/export.html
আইবিএম থেকে টিউটোরিয়াল উদাহরণস্বরূপ এই বাশ দেখুন । এমনকি এটি ব্যবহারের একটি উদাহরণও অন্তর্ভুক্ত export।