Skip to main content
typo
Source Link
Lawrence
  • 329
  • 1
  • 4
  • 13

I need to add items to a list of items. I am not sure if these are the correct terms.

Example:

Suppose I am inside a directory with 2 files, "a" and "b". If I pipe ls to less my list will have two items, "a" and "b": ls | less

I want to pipe ls to less, but before reach the less command I want an item added to the list. e.g:

ls -->unknow shell feature<-- less

And the content listed by less would be "a", "b" and "c" (file "c" doesn't exitexist)

Is it possible?

I need to add items to a list of items. I am not sure if these are the correct terms.

Example:

Suppose I am inside a directory with 2 files, "a" and "b". If I pipe ls to less my list will have two items, "a" and "b": ls | less

I want to pipe ls to less, but before reach the less command I want an item added to the list. e.g:

ls -->unknow shell feature<-- less

And the content listed by less would be "a", "b" and "c" (file "c" doesn't exit)

Is it possible?

I need to add items to a list of items. I am not sure if these are the correct terms.

Example:

Suppose I am inside a directory with 2 files, "a" and "b". If I pipe ls to less my list will have two items, "a" and "b": ls | less

I want to pipe ls to less, but before reach the less command I want an item added to the list. e.g:

ls -->unknow shell feature<-- less

And the content listed by less would be "a", "b" and "c" (file "c" doesn't exist)

Is it possible?

Became Hot Network Question
Source Link
Lawrence
  • 329
  • 1
  • 4
  • 13

Add an item to a list of piped items

I need to add items to a list of items. I am not sure if these are the correct terms.

Example:

Suppose I am inside a directory with 2 files, "a" and "b". If I pipe ls to less my list will have two items, "a" and "b": ls | less

I want to pipe ls to less, but before reach the less command I want an item added to the list. e.g:

ls -->unknow shell feature<-- less

And the content listed by less would be "a", "b" and "c" (file "c" doesn't exit)

Is it possible?