Skip to content

Files

Latest commit

 

History

History
25 lines (15 loc) · 505 Bytes

SC2225.md

File metadata and controls

25 lines (15 loc) · 505 Bytes

Pattern: Use of cp without destination

Issue: -

Description

This may be because the source and destination was accidentally merged into a single argument, or because the line was broken in an invalid way.

Fix the cp statement by correctly specifying both source and destination.

Example of incorrect code:

cp "$file $dir"

Example of correct code:

cp "$file" "$dir"

Further Reading