The Linux/shell of the interview question summary

Source: Internet
Author: User

Linux

Linux CSHRC file functions

How Linux processes/view process/kill process

What permissions does Linux file 755 represent?

Linux worker threads

Linux inter-Process communication method

Pipeline,msgq ...

Inter-process Communication _ Baidu Encyclopedia

Http://baike.baidu.com/link?url=tLNXNQvG5Wo6NptnjkflYaUQbdqW5fC3n40Cv4iF4YSX5EzgfJgwIbZnAfpXLVV1QRvP1293Dgo9qRBmSVfME_

Shell

What is $*?
Would display all the commandline arguments that is passed to the script

What's the difference between a shell variable that's exported and the one that's not exported?
Export Lang=c
Would make the variable LANG the global variable and put it into the global environment. All and processes can use it.
Lang=c
Would change the value of the current script.

How would you list only the empty lines in a file (using grep)?
grep "^[]*$" filename.txt
In character set (between [and] one space and tab is given)
This command would gives all the blank line including those have space and tabs (if pressed) only

How does the read arguments in a shell program-$ $?
#!/bin/sh
For I in $*
Do
Echo $i
Done
On Executig the above script with any number of command-line arguments it would display all the Parametsrs.

How would do I get the character positions 10-20 from a text file?
Cut-c10-20 <filename.txt>
Or
Cat Filename.txt | Cut-c 10-20

The Linux/shell of the interview question summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.