answersLogoWhite

0


Best Answer

That's what cp(1) program is good for: cp this that "something else" /dir/to/

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Shell script that copies multiple files to a directory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the two ways you can execute a shell script when you do not have execute access permission for the file containing the script?

To do this you will need at least read permission; if you don't have that then you will not be able to execute the script at all. One way is to copy the script to your directory and add the execute permission. The second way is to call the correct shell interpreter program directly, as in: ksh /some/file/shell


When might it be necessary or advisable to write a shell script instead of a shell function?

A shell function will do nothing unless it is explicitly called by other code, typically in a shell script. A shell script is a runnable, executable process, which can call other shell scripts and/or functions. The question might be worded backwards - it is necessary to write shell functions for shell scripts when certain logical functionality is required to be performed multiple times. Consider a shell function equivalent to a program subroutine - they operate the same way.


Write a shell script to create two directories and store five files in one directory using the related commands and to transfer all the Files to another directory?

#!/bin/sh mkdir homework lazyass for i in $(seq 5); do touch homework/file-$i; done mv homework/* lazyass


What is the Difference between c and shell program execution?

The shell interprets the script, while the C-compiler generates a binary executable.


Write a program in shell script to display odd number from 0 to 100?

seq 1 2 99

Related questions

Write a shell script that copies multiple files to a directory?

why not use the cp command to copy multiple files, i.e. cp file1 file2 file3 dir Rick


Write a shell script that converts multiple files to a directory?

You need to be more specific in your question - the use of 'convert' may mean different things. What is the net effect of what you are trying to do?


What are the two ways you can execute a shell script when you do not have execute access permission for the file containing the script?

To do this you will need at least read permission; if you don't have that then you will not be able to execute the script at all. One way is to copy the script to your directory and add the execute permission. The second way is to call the correct shell interpreter program directly, as in: ksh /some/file/shell


Write a shell program using the if-the-else to test whether a variable name is a directory or a file?

# shell script example if [ -f $1 ]; then echo $1 is a file elsif [ -d $1 ]; then echo $1 is a directory fi


What is the command to verify your source directory exists?

There are several ways to verify a directory. You could use the following test in a shell script: if [ -d some-directory ]; then # directory exists else # directory does not exist fi of use commands such as 'ls 'to see if it exists.


How can you open an external application in Visual studio 2005 using visual basic script?

To open a file simply use the command shell("directory")


What is the command to execute a shell script?

If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile


Write a shell script to sort all the files in the current directory in an alphabetical order and direct the sorted list to a new file?

The following simple shell command lists the contents of a directory (verbose), and redirects the output to 'newfile.txt': ls -l > newfile.txt See related links.


It is possible to build a C compiler on top of a C compiler?

It is possible to build a C compiler on top of a C compiler. From the directory, run the shell script.


When might it be necessary or advisable to write a shell script instead of a shell function?

A shell function will do nothing unless it is explicitly called by other code, typically in a shell script. A shell script is a runnable, executable process, which can call other shell scripts and/or functions. The question might be worded backwards - it is necessary to write shell functions for shell scripts when certain logical functionality is required to be performed multiple times. Consider a shell function equivalent to a program subroutine - they operate the same way.


Write a shell script file called letter1 After running the script it will prompt the user for an English alphabet confirm the alphabet chosen and then search the current directory for all files?

Question is too vague; what do you mean by 'confirm the alphabet chosen'?


Can you execute a shell script if you do not have read permission for the file containing the script?

No, the shell needs both execute and read permissions to run the script.