I need to create a shell script which will output certain lines in a file. For example ./line file1 6 11 will output lines 6 to 11 of the file. I am not good at shell script, I am a beginner. I have tried to write this script but just cannot. If anybody can help by giving me a website similar to this problem, please send it thanks.
123a
0
Newbie Poster
Recommended Answers
Jump to PostI need to create a shell script which will output certain lines in a file. For example ./line file1 6 11 will output lines 6 to 11 of the file. I am not good at shell script, I am a beginner. I have tried to write this script but just …
Jump to Postsed -n '6,11p' file1
Jump to Postsed -n '6,11p' file1
Show-off
All 9 Replies
gerard4143
371
Nearly a Posting Maven
Aia
1,977
Nearly a Posting Maven
gerard4143
371
Nearly a Posting Maven
123a
0
Newbie Poster
ben1
0
Newbie Poster
ben1
0
Newbie Poster
ben1
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
ben1
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.