How to create files from a list which contain space [duplicate]How to make xargs handle spaces and special...
What is the Leave No Trace way to dispose of coffee grounds?
Why only 37.5Gb on my 1Tb hard drive?
The origin of the Russian proverb about two hares
What is the color of artificial intelligence?
Solving this logarithmic problem
Why does smartdiagram replace the Greek letter xi by a number?
A word that means "blending into a community too much"
How can one's career as a reviewer be ended?
Is there a set of positive integers of density 1 which contains no infinite arithmetic progression?
How to avoid typing 'git' at the begining of every Git command
Why the output signal of my amplifier is heavily distorted
Is it safe to change the harddrive power feature so that it never turns off?
Can a human be transformed into a Mind Flayer?
Why do radiation hardened IC packages often have long leads?
What differences exist between adamantine and adamantite in all editions of D&D?
Why is long-term living in Almost-Earth causing severe health problems?
I've been given a project I can't complete, what should I do?
What are formats in LaTeX and how to manage them?
How to befriend someone who doesn't like to talk?
What is the logic behind charging tax _in the form of money_ for owning property when the property does not produce money?
Does putting salt first make it easier for attacker to bruteforce the hash?
How can powerful telekinesis avoid violating Newton's 3rd Law?
Live action TV show where High school Kids go into the virtual world and have to clear levels
If I leave the US through an airport, do I have to return through the same airport?
How to create files from a list which contain space [duplicate]
How to make xargs handle spaces and special chars from cat?Why does my shell script choke on whitespace or other special characters?Efficient way to create multiple filesHow to create multiple files/directories with randomized names?Why does touch create new files?How to create files named 'a to z' - any trick?use find and grep to find lines that contain some string and don't contain other string from filesHow can you move or copy specific files from a list of text filesHow to create symlinks from fileFilter directories from list of files and directoriesGit unstash all files from listTo create files under existing nested directories in Fedora 23
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
This question already has an answer here:
How to make xargs handle spaces and special chars from cat?
4 answers
I would like to create files from the following list.
There is no problem if the list doesn't have a space ... but the problem is it has a space
user@linux:~$ cat file.txt
Apples
Bing Cherry
Crab Apples
Dragon Fruit
user@linux:~$
Before
ser@pc:~$ ls -l
total 4
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
user@linux:~$
xargs touch
user@linux:~$ cat file.txt | xargs touch
user@linux:~$
Instead of creating Apples, Bing Cherry, Crab Apples, Dragon Fruit
, the command producing these output.
After
user@linux:~$ ls -l
total 4
-rw-r--r-- 1 user user 0 Jun 9 14:11 Apples
-rw-r--r-- 1 user user 0 Jun 9 14:11 Bing
-rw-r--r-- 1 user user 0 Jun 9 14:11 Cherry
-rw-r--r-- 1 user user 0 Jun 9 14:11 Crab
-rw-r--r-- 1 user user 0 Jun 9 14:11 Dragon
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
-rw-r--r-- 1 user user 0 Jun 9 14:11 Fruit
user@linux:~$
What should I do to handle space in this situation?
xargs touch
marked as duplicate by Kusalananda♦ 4 mins ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to make xargs handle spaces and special chars from cat?
4 answers
I would like to create files from the following list.
There is no problem if the list doesn't have a space ... but the problem is it has a space
user@linux:~$ cat file.txt
Apples
Bing Cherry
Crab Apples
Dragon Fruit
user@linux:~$
Before
ser@pc:~$ ls -l
total 4
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
user@linux:~$
xargs touch
user@linux:~$ cat file.txt | xargs touch
user@linux:~$
Instead of creating Apples, Bing Cherry, Crab Apples, Dragon Fruit
, the command producing these output.
After
user@linux:~$ ls -l
total 4
-rw-r--r-- 1 user user 0 Jun 9 14:11 Apples
-rw-r--r-- 1 user user 0 Jun 9 14:11 Bing
-rw-r--r-- 1 user user 0 Jun 9 14:11 Cherry
-rw-r--r-- 1 user user 0 Jun 9 14:11 Crab
-rw-r--r-- 1 user user 0 Jun 9 14:11 Dragon
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
-rw-r--r-- 1 user user 0 Jun 9 14:11 Fruit
user@linux:~$
What should I do to handle space in this situation?
xargs touch
marked as duplicate by Kusalananda♦ 4 mins ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago
add a comment |
This question already has an answer here:
How to make xargs handle spaces and special chars from cat?
4 answers
I would like to create files from the following list.
There is no problem if the list doesn't have a space ... but the problem is it has a space
user@linux:~$ cat file.txt
Apples
Bing Cherry
Crab Apples
Dragon Fruit
user@linux:~$
Before
ser@pc:~$ ls -l
total 4
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
user@linux:~$
xargs touch
user@linux:~$ cat file.txt | xargs touch
user@linux:~$
Instead of creating Apples, Bing Cherry, Crab Apples, Dragon Fruit
, the command producing these output.
After
user@linux:~$ ls -l
total 4
-rw-r--r-- 1 user user 0 Jun 9 14:11 Apples
-rw-r--r-- 1 user user 0 Jun 9 14:11 Bing
-rw-r--r-- 1 user user 0 Jun 9 14:11 Cherry
-rw-r--r-- 1 user user 0 Jun 9 14:11 Crab
-rw-r--r-- 1 user user 0 Jun 9 14:11 Dragon
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
-rw-r--r-- 1 user user 0 Jun 9 14:11 Fruit
user@linux:~$
What should I do to handle space in this situation?
xargs touch
This question already has an answer here:
How to make xargs handle spaces and special chars from cat?
4 answers
I would like to create files from the following list.
There is no problem if the list doesn't have a space ... but the problem is it has a space
user@linux:~$ cat file.txt
Apples
Bing Cherry
Crab Apples
Dragon Fruit
user@linux:~$
Before
ser@pc:~$ ls -l
total 4
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
user@linux:~$
xargs touch
user@linux:~$ cat file.txt | xargs touch
user@linux:~$
Instead of creating Apples, Bing Cherry, Crab Apples, Dragon Fruit
, the command producing these output.
After
user@linux:~$ ls -l
total 4
-rw-r--r-- 1 user user 0 Jun 9 14:11 Apples
-rw-r--r-- 1 user user 0 Jun 9 14:11 Bing
-rw-r--r-- 1 user user 0 Jun 9 14:11 Cherry
-rw-r--r-- 1 user user 0 Jun 9 14:11 Crab
-rw-r--r-- 1 user user 0 Jun 9 14:11 Dragon
-rw-r--r-- 1 user user 44 Jun 9 14:06 file.txt
-rw-r--r-- 1 user user 0 Jun 9 14:11 Fruit
user@linux:~$
What should I do to handle space in this situation?
This question already has an answer here:
How to make xargs handle spaces and special chars from cat?
4 answers
xargs touch
xargs touch
asked 31 mins ago
SabrinaSabrina
326110
326110
marked as duplicate by Kusalananda♦ 4 mins ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kusalananda♦ 4 mins ago
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago
add a comment |
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago
add a comment |
1 Answer
1
active
oldest
votes
specify newline as the separator:
cat file.txt | xargs touch --delimiter='n'
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
specify newline as the separator:
cat file.txt | xargs touch --delimiter='n'
add a comment |
specify newline as the separator:
cat file.txt | xargs touch --delimiter='n'
add a comment |
specify newline as the separator:
cat file.txt | xargs touch --delimiter='n'
specify newline as the separator:
cat file.txt | xargs touch --delimiter='n'
answered 6 mins ago
JasenJasen
2,366813
2,366813
add a comment |
add a comment |
See also the section of this answer labelled "What's wrong with xargs?".
– Kusalananda♦
1 min ago