10 More Discussions You Might Find Interesting
1. OS X (Apple)
Hello, fellow Unixers and Macers,
I'll run several OS X versions each on its own dedicated partition. Partitions won't be seeing each other (by editing fstab). Question: will I be able to copy files between those partitions? Partition #1: Mavericks. Partition #2: HighSierra (2 Replies)
Discussion started by: scrutinizerix
2 Replies
2. Shell Programming and Scripting
is there any single command for
cat file1 > file2
cp /dev/null file1
The original file must retain intact but it should get empty. Actually, the contents needs to be processed by another process and for new entries, the file must remain there with zero records. (4 Replies)
Discussion started by: busyboy
4 Replies
3. Shell Programming and Scripting
Hi
I have a prompt like this:
PS1='\\u@\h \\w $(es=$?; ] && echo "\" || echo "\")\$\'
It works like it should, but have a bug.
Problem is the counting of hidden files
$(($(ls -ad .* | wc -l)-2))
echo $(($(ls -ad .* | wc -l)-2))
The . seems to create the problem when I cut and past to... (3 Replies)
Discussion started by: Jotne
3 Replies
4. Shell Programming and Scripting
Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below.
I am on a solaris server btw.
Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose.
... (2 Replies)
Discussion started by: goddevil
2 Replies
5. Shell Programming and Scripting
I want to add a "-r <remote_host>" option to my ksh script, causing the script to run a script of the same name on the specified remote host. The remote invocation should itself include all the command-line options of the original invocation, less the -r option.
For example, this invocation:
... (7 Replies)
Discussion started by: mattmiller
7 Replies
6. Shell Programming and Scripting
I need to be able to choose an option in order to copy a file. So far, I have this:
echo "Please input file name after option and use -c to copy, -r
replace, or -x to delete"
if
then
echo "You must provide a filename!"
exit 1
fi
if
then
cp -- "$@"
echo... (5 Replies)
Discussion started by: squardius
5 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have problems with the cc option in mailx command. Just went through some of the similar threads but none provides a satisfactory explanation.
I have a script using the mailx command in the following way:
(echo `cat mailsub.txt` ; uuencode attachment.csv attachment.csv) | mailx -s... (2 Replies)
Discussion started by: SmithaN
2 Replies
8. UNIX for Dummies Questions & Answers
So tried:
cp -r -p test1/ user@machine:///srv/www/vhosts/domain.co.uk/httpdocs/backup/
but this didn't work either :(
Anyone able to help with this?
Many thanks
Mr M (3 Replies)
Discussion started by: misterm
3 Replies
9. UNIX for Dummies Questions & Answers
All,
I am new to unix and i have the following requirement.
I have file(s) landing into input directory with timestamp, first i want to copy all these files into seperate directory then i want to rename these files without timestamp and also remove header,trailer from that file..
Could... (35 Replies)
Discussion started by: ksrams
35 Replies
10. Shell Programming and Scripting
Hi All,
I am trying to find files in a directory and don't want to search in the sub directories and using the command
find . \( ! -name . -prune \) -mtime +1 -name '*.log'
and is working fine.
But when I am trying with absolute path then is not working like
find /home/subodh \( ! -name... (1 Reply)
Discussion started by: subodh.sharma
1 Replies