UNIX Unleashed, System Administrator's Edition phần 2

Chương 17 - Quản lý người sử dụng Chương 18 - File System và Cục Quản lý đĩa Chương 19 - Cấu hình Kernel Chương 20 - Mạng Chương 21 - Hệ thống kế toán Chương 22 - Hiệu suất và Điều chỉnh | input to ed the output is written back to the file on which it is applied. If we execute more on the file diffout you can see the extra line at the end more diffout 6 8c This is the seventh line This is the eighth line This is the ninth line 4d 2a This is the third line w To update filel and see the result you now use the following command ed - filel diffout more filell This is the This is the This is the This is the This is the This is the This is the This is the first line second line third line fourth line sixth line seventh line eighth line ninth line If you do not want to update the original file use the command l p instead of w. This generates the output to the standard output instead. You can also redirect the output to a file as follows ed - filel diffout To generate output in reverse order to that specified by -e execute the following command with the -f flag a2 This is the third line d4 c6 8 This is the seventh line This is the eighth line This is the ninth line If you do not care about whether the files have lowercase or uppercase letters use the -i flag to execute case-insensitive diff as in the following command diff -i file1 file2 2a3 This is the third line 4d4 Ti s the fifth line 6 7c6 7 This is the seventh line This is the eighth line --- This is the seventh line This is the eighth Notice that the lines This is the ninth line in file1 and This is the ninth line in file2 are evaluated to be equal due to use of the -i flag. If you want to know the number of lines affected by each insertion or deletion use the -n flag as in the following command diff -n filel file2 a2 l This is the third line d4 1 d6 3 a8 3 This is the seventh line This is the eighth line This is the ninth line The information in the above lines is with respect to filel. It tells you that one line is to be inserted after line 2 followed by the lines to be inserted one line is to be deleted at line 4 three lines are deleted at line 6 and 3 lines are to be inserted after line 8

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.