Issue
I have a text table that I am displaying using less -S -R
.
alt="enter image description here" />
I would like that 3rd and 4th line of the output (the last 2 blue lines) to be a sticky header, so that it would work similar to the header here. Is it possible to do this with less?
Without using less, it's just a table of text (with special characters for the colours). You can copy this text into a my_file.txt
file and run cat my_file.txt | less -S -R
if you would like to test it out
2022-02-25T15:15:17.963Z
CCXT v1.74.16
publicAPI | privateAPI | CORS | spot | margin | swap | future | option | addMargin | cancelAllOrders | cancelOrder | cancelOrders | createDepositAddress | createLimitOrder | createMarketOrder | createOrder | createReduceOnlyOrder | deposit | editOrder | fetchAccounts | fetchBalance | fetchBidsAsks | fetchBorrowRate | fetchBorrowRateHistories | fetchBorrowRateHistory | fetchBorrowRates | fetchBorrowRatesPerSymbol | fetchCanceledOrders | fetchClosedOrder | fetchClosedOrders | fetchCurrencies | fetchDeposit | fetchDepositAddress | fetchDepositAddresses | fetchDepositAddressesByNetwork | fetchDeposits | fetchFundingFee | fetchFundingFees | fetchFundingHistory | fetchFundingRate | fetchFundingRateHistories | fetchFundingRateHistory | fetchFundingRates | fetchIndexOHLCV | fetchIsolatedPositions | fetchL2OrderBook | fetchL3OrderBook | fetchLedger | fetchLedgerEntry | fetchLeverage | fetchLeverageTiers | fetchMarkOHLCV | fetchMarketLeverageTiers | fetchMarkets | fetchMyBuys | fetchMySells | fetchMyTrades | fetchOHLCV | fetchOpenOrder | fetchOpenOrders | fetchOrder | fetchOrderBook | fetchOrderBooks | fetchOrderTrades | fetchOrders | fetchOrdersByStatus | fetchPosition | fetchPositions | fetchPositionsRisk | fetchPremiumIndexOHLCV | fetchStatus | fetchTicker | fetchTickers | fetchTime | fetchTrades | fetchTradingFee | fetchTradingFees | fetchTradingLimits | fetchTransactions | fetchTransfer | fetchTransfers | fetchWithdrawAddressesByNetwork | fetchWithdrawal | fetchWithdrawalWhitelist | fetchWithdrawals | loadLeverageBrackets | loadMarkets | reduceMargin | setLeverage | setMarginMode | setPositionMode | signIn | transfer | withdraw
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[32maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [22m[2m[31maax[39m[22m | [32maax[39m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [91maax[39m | [32maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [32maax[39m | [32maax[39m | [22m[2m[31maax[39m[22m | [91maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [32maax[39m | [91maax[39m | [32maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [22m[2m[31maax[39m[22m | [32maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [32maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [22m[2m[31maax[39m[22m | [32maax[39m | [32maax[39m | [33maax[39m | [32maax[39m | [32maax[39m | [32maax[39m | [22m[2m[31maax[39m[22m | [22m[2m[31maax[39m[22m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [91maax[39m | [32maax[39m | [22m[2m[31maax[39m[22m | [91maax[39m | [91maax[39m | [91maax[39m | [91maax[39m
[32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [22m[2m[31mascendex[39m[22m | [22m[2m[31mascendex[39m[22m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [33mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [22m[2m[31mascendex[39m[22m | [22m[2m[31mascendex[39m[22m | [91mascendex[39m | [22m[2m[31mascendex[39m[22m | [32mascendex[39m | [22m[2m[31mascendex[39m[22m | [22m[2m[31mascendex[39m[22m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [22m[2m[31mascendex[39m[22m | [32mascendex[39m | [22m[2m[31mascendex[39m[22m | [33mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [22m[2m[31mascendex[39m[22m | [91mascendex[39m | [22m[2m[31mascendex[39m[22m | [32mascendex[39m | [22m[2m[31mascendex[39m[22m | [22m[2m[31mascendex[39m[22m | [33mascendex[39m | [32mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m | [32mascendex[39m | [91mascendex[39m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [32mascendex[39m | [22m[2m[31mascendex[39m[22m | [91mascendex[39m | [91mascendex[39m | [91mascendex[39m
[32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [33mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [95mbinance[39m | [32mbinance[39m | [22m[2m[31mbinance[39m[22m | [22m[2m[31mbinance[39m[22m | [91mbinance[39m | [91mbinance[39m | [33mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [91mbinance[39m | [91mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [91mbinance[39m | [91mbinance[39m | [91mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [33mbinance[39m | [32mbinance[39m | [91mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [91mbinance[39m | [32mbinance[39m | [32mbinance[39m | [22m[2m[31mbinance[39m[22m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [91mbinance[39m | [22m[2m[31mbinance[39m[22m | [91mbinance[39m | [32mbinance[39m | [91mbinance[39m | [22m[2m[31mbinance[39m[22m | [22m[2m[31mbinance[39m[22m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [32mbinance[39m | [22m[2m[31mbinance[39m[22m | [32mbinance[39m | [32mbinance[39m
[32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [33mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [95mbinancecoinm[39m | [32mbinancecoinm[39m | [22m[2m[31mbinancecoinm[39m[22m | [22m[2m[31mbinancecoinm[39m[22m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [33mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [33mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [22m[2m[31mbinancecoinm[39m[22m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [22m[2m[31mbinancecoinm[39m[22m | [91mbinancecoinm[39m | [32mbinancecoinm[39m | [91mbinancecoinm[39m | [22m[2m[31mbinancecoinm[39m[22m | [22m[2m[31mbinancecoinm[39m[22m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [32mbinancecoinm[39m | [22m[2m[31mbinancecoinm[39m[22m | [32mbinancecoinm[39m | [32mbinancecoinm[39m
[32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [33mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [95mbinanceusdm[39m | [32mbinanceusdm[39m | [22m[2m[31mbinanceusdm[39m[22m | [22m[2m[31mbinanceusdm[39m[22m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [33mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [33mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [22m[2m[31mbinanceusdm[39m[22m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [22m[2m[31mbinanceusdm[39m[22m | [91mbinanceusdm[39m | [32mbinanceusdm[39m | [91mbinanceusdm[39m | [22m[2m[31mbinanceusdm[39m[22m | [22m[2m[31mbinanceusdm[39m[22m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [32mbinanceusdm[39m | [22m[2m[31mbinanceusdm[39m[22m | [32mbinanceusdm[39m | [32mbinanceusdm[39m
[32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [33mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [91mbitmart[39m | [32mbitmart[39m
[32mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [32mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [91mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [33mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [22m[2m[31mbitvavo[39m[22m | [91mbitvavo[39m | [91mbitvavo[39m | [32mbitvavo[39m
Solution
A --header
option was recently added in less 600 (released on 2022-01-07) for that:
--header=N[,M] Sets the number of header lines and columns displayed on the screen. The value may be of the form "N,M" where N and M are integers, to set the header lines to N and the header columns to M, or it may be a single integer "N" which sets the header lines to N and the header columns to zero. When N is nonzero, the first N lines at the top of the screen are replaced with the first N lines of the file, regardless of what part of the file are being viewed. When M is nonzero, the characters displayed at the beginning of each line are replaced with the first M characters of the line, even if the rest of the line is scrolled horizontally. If either N or M is zero, less stops displaying header lines or columns, respectively. (Note that it may be necessary to change the setting of the -j option to ensure that the target line is not obscured by the header line(s).)
So less --header 4
would do it for your sample with that newer version of less
.
Answered By - Stephane Chazelas Answer Checked By - Mildred Charles (WPSolving Admin)