M
M
maniac_by2019-12-26 13:20:48
linux
maniac_by, 2019-12-26 13:20:48

Why does CP add "?" at the end after starting from a script? and does not apply arguments?

Why when run from a script, for example,

cp -P /opt/atlassian/jira/atlassian-jira/WEB-INF/web.xml  /home/username/web.xml

is the file copied without arguments and in the form of web.xml ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sergey, 2019-12-27
@maniac_by

maniac_by
I think it's a script made with Windows
line endings ?
if you
save this in the script and execute it in / bin / sh, then it will appear
just being
treated by removing\r
sed -i 's|\r||g' a.sh

S
Saboteur, 2019-12-26
@saboteur_kiev

1.
-P, --no-dereference
never follow symbolic links in SOURCE
do you have symbolic links in the path?
2. What is "apply arguments" where exactly does it add a question mark?
Give an example of console output or result, it is not very clear what is wrong with you

R
Radjah, 2019-12-26
@Radjah

As an optiondos2unix твой_скрипт

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question