首页 > Linux操作系统 > Linux操作系统 > Morgan Stanley
$ file=exec.o
$ lastchar=$(echo $file | sed 's/.*\(.\)$/\1/')
$ echo $lastchar
$ filename=/users/steve/memos
$ firstchar=$(echo $filename | cut -c1)
$ filename=$(echo $filename | tr "$firstchar" "^") #translate / to ^
$ filename=/users/steve/memos
$ filename=$(echo $filename | tr "$(echo $filename | cut -c1)" "^")
expr 1 + 2 #There is one space in 1,+, 2
expr 10 + 20 / 2
i=`expr $i + 1`
Table CustomerOrder, columns customerid, orderid, orderdate.
Give a query for customers that placed orders today
Query to get the day in the last 30 days with the most orders
What is an index?
Why not add an index to all the columns?
What data structure to store index data?
Why a btree?
* Employees
o id
o name
o department_id
o start_date
o salary
* Departments
o id
o department
get max salary
get all names and dept
get dept that spends most on salary:
Write a program/script. to find a file in the current directory and sub-directories, tools like find and grep are missing.

In a particular directory, list the 15 recently modified files. ls -ltr | tail -15.
Replace a word "Old" with word "new" in all the files of the directory. Solution can be a linux script. also.
sed -i 's/Old/new/g' *.txt
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7899089/viewspace-734824/ ,如需转载,请注明出处,否则将追究法律责任。