Answer the question
In order to leave comments, you need to log in
Why service characters do not work everywhere?
I'm probably trying to do complete nonsense right now (most likely), but still I'm still dealing with Linux (Understand and forgive).
I'm trying to use service-characters or special characters or command-characters! they are called differently everywhere, and there are also regular expressions (as I understand it, this applies only to grep) ... Well, nothing works, I want to redirect the asdasdasd text in file 1.txt to other files with the .txt extension, but it turns out this only if you use the full name for example cat 1.txt > 3.txt then everything is transferred, what am I doing wrong and how is it right?
Answer the question
In order to leave comments, you need to log in
bash can't do that, after expanding the arguments, there is an ambiguity due to the large number of arguments (in fact, the error message says "ambiguous redirect" in the error message).
You can use the utility tee
, it can do this, for example: it
cat 1.txt | tee {2,3,4,5}.txt 1>/dev/null
tee
directs output to a file and to standard output, you can not add 1>/dev/null
, then the contents of the file will also be displayed on the screen, but this is hardly required in this situation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question