How to get tail result with line numberwill tail with piping read whole file?How to tail multiple files using...
Why is my vegetable stock bitter, but the chicken stock not?
Quote to show students don't have to fear making mistakes
Can we calculate the orbit of exoplanets?
Why didn't the Universal Translator speak whale?
How to explain that the sums of numerators over sums of denominators isn't the same as the mean of ratios?
Non-electric Laser
Is there any problem with students seeing faculty naked in university gym?
Using 4K Skyrim Textures when running 1920 x 1080 display resolution?
I've been fired, was allowed to announce it as if I quit and given extra notice, how to handle the questions?
Was Smaug sealed inside the Lonely Mountain?
What is the origin of the minced oath “Jiminy”?
When can this condition on linear codes be satisfied?
How fast are we moving relative to the CMB?
As a girl, how can I voice male characters effectively?
How does Donald Trump manage to remain so popular over a rather long period of time?
Choice of solvent during thin layer chromatography
What makes a character irredeemable?
Bash-script as linux-service won't run, but executed from terminal works perfectly
How come the Russian cognate for the Czech word "čerstvý" (fresh) means entirely the opposite thing (stale)?
Why do many websites hide input when entering a OTP
Is insurance company’s preferred auto shop biased?
Does it require less energy to reach the Sun from Pluto's orbit than from Earth's orbit?
Can I pay off my mortgage with a new one?
Proof of bound on optimal TSP tour length in rectangular region
How to get tail result with line number
will tail with piping read whole file?How to tail multiple files using tail -0f in Linux/AIXTail a file for specific textHow to EDIT only the last line (or any specific line number(s)) using awk command?Is there a way while using tail to get it to tell number of lines without using cat?Tail Grep - Print surrounding lines until pattern is matchedHow to find encapsulating function name from line numberDisplay line number in head and tail command like `cat -n`
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}
I tried to use tail xxxx.log | nl
to get last 10 lines and their line numbers, but nl command only counts the lines of tailed result. Say there're 20 lines in that file, the returned result's actual line number should be from 11 to 20 which is what I want, but 1 to 10 is returned by this command.
linux tail
New contributor
add a comment
|
I tried to use tail xxxx.log | nl
to get last 10 lines and their line numbers, but nl command only counts the lines of tailed result. Say there're 20 lines in that file, the returned result's actual line number should be from 11 to 20 which is what I want, but 1 to 10 is returned by this command.
linux tail
New contributor
add a comment
|
I tried to use tail xxxx.log | nl
to get last 10 lines and their line numbers, but nl command only counts the lines of tailed result. Say there're 20 lines in that file, the returned result's actual line number should be from 11 to 20 which is what I want, but 1 to 10 is returned by this command.
linux tail
New contributor
I tried to use tail xxxx.log | nl
to get last 10 lines and their line numbers, but nl command only counts the lines of tailed result. Say there're 20 lines in that file, the returned result's actual line number should be from 11 to 20 which is what I want, but 1 to 10 is returned by this command.
linux tail
linux tail
New contributor
New contributor
New contributor
asked 5 mins ago
user374795user374795
6
6
New contributor
New contributor
add a comment
|
add a comment
|
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
user374795 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f544262%2fhow-to-get-tail-result-with-line-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
user374795 is a new contributor. Be nice, and check out our Code of Conduct.
user374795 is a new contributor. Be nice, and check out our Code of Conduct.
user374795 is a new contributor. Be nice, and check out our Code of Conduct.
user374795 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f544262%2fhow-to-get-tail-result-with-line-number%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown