Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
Cuando intento ejecutar mi script bash, me arroja un error como este
case $choice in 1) read -p "Enter the file to copy:" file read -p "Enter the new file name:" newfile $(cp file newfile) ;; 2) read -p "Enter the file to move:" mvfile read -p "Enter the file where to move:" newmv $(mv mvfile newmv) ;; 3) read -p "Enter the file name to remove:" filenm $(rm filenm) ;; esac

Error:

 What do you want to do: 1) To copy from one file to another file 2) To move a file 3) To remove a file ********************************************** Enter the choice:1 Enter the file to copy:common.txt Enter the new file name:clone.txt cp: cannot stat 'file': No such file or directory root@root1-VirtualBox:/home/root1#

(cuando trato de ejecutar esto me arroja un error como este!!)

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

file y newfile son variables, debe abordarlas con un $ :

 $(cp $file $newfile)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!