Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the shell interview questions?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you what the shell interview questions are, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

1. Use sed to modify 23 lines of test.txt from test to tset

Sed-i '23s _

2. View the contents of the third column in line 25 of / web.log.

Sed-n '25p' / web.log | cut-d ""-f3

Head-n25 / web.log | tail-N1 | cut-d ""-f3

Awk-F "'NR==23 {print $3}' / web.log

Delete the first three lines of each temporary file.

Sed-i '1Jing 3d' / tmp/*.tmp

4. Script programming: find the prime number within 100.

#! / bin/bash

I, 1

While [$I-le 100]; do

Ret=1

For ((jambo2witj > / etc/crontab)

6. Write a shell script to transfer the files greater than 10K in the current directory to the / tmp directory

#! / bin/bash

Fileinfo= ($(du./*))

Length=$ {# fileinfo [@]}

For ((iSuppli)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report