If you’re talking about the error message, you can suppress that by sending it to the bit bucket:
cp ./src/*/*.h ./aaa 2>/dev/null
If you want to suppress the exit code and the error message:
cp ./src/*/*.h ./aaa 2>/dev/null || :
Related Posts:
- How do I copy a folder from remote to local using scp?
- Meaning of “! -S” in shell script
- “No such file or directory” but it exists
- How do I split a string on a delimiter in Bash?
- Ubuntu says “bash: ./program Permission denied” [closed]
- Should I put #! (shebang) in Python scripts, and what form should it take?
- Should I put #! (shebang) in Python scripts, and what form should it take?
- How to concatenate string variables in Bash
- -bash: syntax error near unexpected token `)’
- An example of how to use getopts in bash
- How to delete from a text file, all lines that contain a specific string?
- How to mkdir only if a directory does not already exist?
- How do I iterate over a range of numbers defined by variables in Bash?
- How to set ssh timeout?
- commands not found on zsh
- sudo: apt-get: command not found
- How do I iterate over a range of numbers defined by variables in Bash?
- Why do people write #!/usr/bin/env python on the first line of a Python script?
- How to mkdir only if a directory does not already exist?
- Using find to locate files that match one of multiple patterns
- “unary operator expected” error in Bash if condition
- What does “-ne” mean in bash?
- Is there a Python equivalent to the ‘which’ command
- How to generate random number in Bash?
- How to check if a variable is set in Bash?
- Who can access a file with octal permissions “000” on Linux/UNIX?
- How can I compare numbers in Bash?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- Open and write data to text file using Bash?
- How do I set a variable to the output of a command in Bash?
- python getoutput() equivalent in subprocess
- What is the $? (dollar question mark) variable in shell scripting?
- Is there a TRY CATCH command in Bash
- dquote> result of a execution a program in linux shell
- Using sudo with Python script
- how to fix the issue “Command /bin/sh failed with exit code 1” in iphone
- Run a string as a command within a Bash script
- conditional binary operator expected in shell script
- Block Comments in a Shell Script
- How to get a shell environment variable in a makefile?
- What are the uses of the exec command in shell scripts?
- using rot13 and tr command for having an encrypted email address
- Shell Script: Execute a python program from within a shell script
- sed whole word search and replace
- What’s the difference betwen the single dash and double dash flags on shell commands?
- How do I copy a file in Python?
- How to execute a program or call a system command?
- Extract substring in Bash
- In the shell, what does ” 2>&1 ” mean?
- What is the difference between a deep copy and a shallow copy?
- Copying a local file from Windows to a remote server using scp
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- How can I recursively find all files in current and subfolders based on wildcard matching?
- How can I check if a directory exists in a Bash shell script?
- How to exclude a directory in find . command
- What is the purpose of “&&” in a shell command?
- Shell command to tar directory excluding certain files/folders
- How do I split a string on a delimiter in Bash?
- How to copy a string of std::string type in C++?
- How can I count all the lines of code in a directory recursively?
- Fastest way to duplicate an array in JavaScript – slice vs. ‘for’ loop
- How can I kill a process by name instead of PID, on Linux?
- How do I do a deep copy of a 2d array in Java?
- Which characters need to be escaped when using Bash?
- Shell script “for” loop syntax
- Shell: How to call one shell script from another shell script?
- Pseudo-terminal will not be allocated because stdin is not a terminal
- How to copy files?
- Meaning of $? (dollar question mark) in shell scripts
- screen Cannot open your terminal ‘/dev/pts/0’ – please check
- ./configure : /bin/sh^M : bad interpreter
- How to convert a string to lower case in Bash?
- How to read a file into a variable in shell?
- Batch file to copy directories recursively
- How to specify the private SSH-key to use when executing shell command on Git?
- How to copy a char array in C?
- Sorting data based on second column of a file
- Writing a simple shell in C using fork/execvp
- Speed up rsync with Simultaneous/Concurrent File Transfers?
- Multi-dimensional arrays in Bash
- Variable interpolation in the shell
- What’s the meaning of the parameter -e for bash shell command line?
- What does set -e mean in a bash script?
- What does set -e mean in a bash script?
- * failed to open vchiq instance
- Check existence of input argument in a Bash shell script
- Copy multiple files from one directory to another from Linux shell
- PG COPY error: invalid input syntax for integer
- Using grep and ls -a commands
- source command not found in sh shell
- How to use sed to extract substring
- How to parse XML in Bash?
- How do I know the script file name in a Bash script?
- What is the difference between double and single square brackets in bash?
- What is “-bash: !”: event not found”
- What does ‘set -e’ do, and why might it be considered dangerous?
- How to add a timestamp to bash script log?
- Colors in bash after piping through less?
- How can I kill all stopped jobs?
- How to copy file preserving directory path in Linux?