View difference between Paste ID: AwvVTk4g and D0biNQY4
SHOW: | | - or go back to the newest paste.
1-
# This functions prints the menu, ask for the path of file and perform appropriate operations on that file
1+
2
        clear       
3-
        clear
3+
4-
       
4+
5
        printf "\nEnter the path to the file:\n"
6
        read path
7-
       
7+
8-
        # Ask for the path of file to perform the operations
8+
9
                2 ) head $path ;;
10
                3 ) tail $path ;;
11-
 
11+
12-
        # Perform appropriate operations according to the options
12+
13
                        cat $path
14-
                # Execute the wc command for the file
14+
15
                        printf "\nAfter sorting...\n"
16-
16+
17-
                # Display first 10 lines of a file
17+
18
        esac 
19-
19+
20-
                # Show first the last 10 lines of a file
20+
21
} 
22-
22+