Sh print file




















Asked 8 years, 5 months ago. Active 4 years ago. Viewed 1. Improve this question. Sam Weinberg Sam Weinberg 2, 2 2 gold badges 11 11 silver badges 5 5 bronze badges.

Just a reminder, the question is for Linux, for Windows you use type filename command — Hammad Khan. Add a comment. Active Oldest Votes. Using cat Since your file is short, you can use cat. Using od If your file contains strange or unprintable characters, you can use od to examine the characters.

Improve this answer. Does less have any clear advantages over other pager programs like pg , or does it just boil down to personal preference? SamWeinberg: less has more features than pg.

Take a look at the less 1 and pg 1 manpages. There are other pagers as well. Take a look at unix. You can also use the tail command to see the last lines of text. Here is an example that lets you select a file in a menu and then prints it. This can be quite useful for situations where control characters would otherwise be invisible. Very often, for interactive use, you are better off using an interactive pager like less or more , though.

To pass the contents of a file as input to a command. An approach usually seen as better UUOC is to use redirection. After wading through that question, I've decided that what you're looking for is echo -n. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. In Linux shell bash script, how to print to a file at the same line?

Ask Question. Asked 10 years ago. Active 10 years ago. Viewed 19k times. FD - Fixed Deposit Calculator. RD - Recurring Deposit Calculator.

Simple Interest Calculator. Aptitude Questions. Country Capital. General English. Mock Test. Picture Puzzle. Plus Minus. Slider Puzzle. Tic Tac Toe. C Project. Java Image Processing Project. Laravel Project. Web Project. Open Source Projects. Shell Programming - Printf Unix Share.



0コメント

  • 1000 / 1000