几个Shell Script面试题

2023-07-06   


1. How do you take a single line of input from the user in a shell script?
   2. Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.
   3. Write a regular expression (or sed script) to replace alloccurrences of the letter ‘f’, followed by any number of characters, followed by the letter ‘a’, followed by one or more numeric characters,followed by the letter ‘n’, and replace what’s found with the string“UNIX”.
   4. What happens to a child process that dies and has no parent process to wait for it and what’s bad about this?
   5. How do you create a swapfile?1. How do you take a single line of input from the user in a shell script?
   2. Write a script to convert all DOS style backslashes to UNIX style slashes in a list of files.
   3. Write a regular expression (or sed script) to replace all occurrences of the letter ‘f’, followed by any number of characters,followed by the letter ‘a’, followed by one or more numeric characters,followed by the letter ‘n’, and replace what’s found with the string “UNIX”.
   4. What happens to a child process that dies and has no parent process to wait for it and what’s bad about this?
   5. How do you create a swapfile?


相关内容:

  1. Shell编程面试题
  2. 软件测试LoadRunner面试题:If you want to stop the execution of your script on error, how do you do that?
  3. linux面试题参考答案(11)
  4. PHP面试题及答案二
  5. 长城宽带面试题
  6. 长城宽带面试题