When multiple lines of input are given, I want to create a one-line command that outputs a copy of each line down one line.
Specifically, for example, the output of
find ./ ．-type fis
aaa.txt bbb.txt ccc.txt
and when this is received as input on a pipe
I want to output
aaa.txt aaa.txt bbb.txt bbb.txt ccc.txt ccc.txt
I would appreciate it if you could tell me what command to use.
This is a postscript.
OS: Cent OS7
Answer # 1
Sorry if you can't execute it because you don't know the execution environment.
I think there are various ways, but I think the following means can be realized simply.
## using sed $find -type f | sed p
## using awk $find -type f | awk '1;1'
- linux - [shell script] convert only lf of a file in which crlf and lf are mixed
- linux shell script creation
- linux - area calculation using shell script
- shell script - questions about linux terminal commands
- linux - shell script duplicate replacement method
- linux - i want to rename and save the previous day's log file with a shell script
- i want to give input automatically when i run the python code in a shell script
- linux - when you want to continue after the job of the shell script qsub is finished
- linux - array is garbled in shell script
- how to reference variables in linux shell script
- linux - shell script if statement doesn't work
- linux - [shell script] replacing the date and time information described in csv
- shell script linux
- i want to resolve shell script error "unexpected end of file" on linux
- linux - i want to count up variables in a centos7 shell script
- cannot execute shell script at specified time with cron
- calculation with shell script
- about shell scripts and shebangs
- Shell script to realize number guessing game
- Shell script to realize guessing game
- linux - retry process in for statement
- linux - about "" and ""
- linux - about bash version upgrade
- linux - file name replacement script
- linux - is there a way to refer back to a character string that matched a wildcard in bash, etc?
- linux - crontab does not work
- perl - extraction and processing from a text file under multiple specified conditions
- bash - i want to register an alias temporarily using a shell script
- linux - about the ldapsearch command
- bash - i can no longer switch users with the su command