How to slice a horizontal tail of a single lineHow can I find a file whose name includes a given string, such...

Is adding a new player (or players) a DM decision, or a group decision?

How to get cool night-vision without lame drawbacks?

Employer wants to use my work email account after I quit, is this legal under German law? Is this a GDPR waiver?

Cascading Repair Costs following Blown Head Gasket on a 2004 Subaru Outback

What are the benefits of using the X Card safety tool in comparison to plain communication?

How to determine what is the correct level of detail when modelling?

Smooth Julia set for quadratic polynomials

Change CPU MHz from Registry

Is this one of the engines from the 9/11 aircraft?

How to split an equation over two lines?

What happens when I sacrifice a creature when my Teysa Karlov is on the battlefield?

How to perform Login Authentication at the client-side?

Plotting with different color for a single curve

Is there a maximum distance from a planet that a moon can orbit?

C-152 carb heat on before landing in hot weather?

Why does the numerical solution of an ODE move away from an unstable equilibrium?

Short and long term plans in a closed game in the Sicilian Defense

Can the US president have someone sent to jail?

Animation advice please

Does ultrasonic bath cleaning damage laboratory volumetric glassware calibration?

How to append a matrix element by element

When is it ok to add filler to a story?

Would a two-seat light aircaft with a landing speed of 20 knots and a top speed of 180 knots be technically possible?

Story-based adventure with functions and relationships



How to slice a horizontal tail of a single line


How can I find a file whose name includes a given string, such as “abcde”?Regarding separate a single file into multiple files according to line separationHow to pass wildcards in command lineGenerating/validating checksums in a single line?can I use logical operators to remove all files that matches with one and/or other pattern in a single line?How to list files and directories of a mount pointHow to get the mplayer's single-line playing progress info?tail: illegal option — -53r error while using head and tail on same file in single scriptHow do you slice in shell?How to convert visible control characters back to non-printing characters (opposite of 'cat -v')?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















given



file1



1:b:c:4


file2



1:3:47:8:aa:2


file3



1:4:5:8:9:11:aaaaa:2:3:4:88:9:10


I want to find the tail of this line after the ':'. To note each file only contains one line always



For example



$ command file1
4
$ command file2
2
$ command file3
10









share|improve this question







New contributor



aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    given



    file1



    1:b:c:4


    file2



    1:3:47:8:aa:2


    file3



    1:4:5:8:9:11:aaaaa:2:3:4:88:9:10


    I want to find the tail of this line after the ':'. To note each file only contains one line always



    For example



    $ command file1
    4
    $ command file2
    2
    $ command file3
    10









    share|improve this question







    New contributor



    aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      given



      file1



      1:b:c:4


      file2



      1:3:47:8:aa:2


      file3



      1:4:5:8:9:11:aaaaa:2:3:4:88:9:10


      I want to find the tail of this line after the ':'. To note each file only contains one line always



      For example



      $ command file1
      4
      $ command file2
      2
      $ command file3
      10









      share|improve this question







      New contributor



      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      given



      file1



      1:b:c:4


      file2



      1:3:47:8:aa:2


      file3



      1:4:5:8:9:11:aaaaa:2:3:4:88:9:10


      I want to find the tail of this line after the ':'. To note each file only contains one line always



      For example



      $ command file1
      4
      $ command file2
      2
      $ command file3
      10






      linux shell






      share|improve this question







      New contributor



      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 13 mins ago









      aki aki

      1




      1




      New contributor



      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      aki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          awk -F: '{print $NF}' file*


          This awk command will print the last column (seperated by : (colon))





          share


























            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/3.0/"u003ecc by-sa 3.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
            });


            }
            });






            aki is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f526336%2fhow-to-slice-a-horizontal-tail-of-a-single-line%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            awk -F: '{print $NF}' file*


            This awk command will print the last column (seperated by : (colon))





            share




























              0














              awk -F: '{print $NF}' file*


              This awk command will print the last column (seperated by : (colon))





              share


























                0












                0








                0







                awk -F: '{print $NF}' file*


                This awk command will print the last column (seperated by : (colon))





                share













                awk -F: '{print $NF}' file*


                This awk command will print the last column (seperated by : (colon))






                share











                share


                share










                answered 5 mins ago









                KamarajKamaraj

                3,0511 gold badge5 silver badges14 bronze badges




                3,0511 gold badge5 silver badges14 bronze badges






















                    aki is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    aki is a new contributor. Be nice, and check out our Code of Conduct.













                    aki is a new contributor. Be nice, and check out our Code of Conduct.












                    aki 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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f526336%2fhow-to-slice-a-horizontal-tail-of-a-single-line%23new-answer', 'question_page');
                    }
                    );

                    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







                    Popular posts from this blog

                    Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                    Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                    Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...