10 More Discussions You Might Find Interesting
1. Programming
hi all,
this is my script and as you can see in the screenshot i attach its not deleting the directory in the source folder
#!/bin/bash
cd /vol/cha-work/_ARCHIVE/to_be_archived/audio/robert_test
temp=/mnt/robert_test/temp
dest=/vol/cha-archive/audio
echo "is this archive for an... (2 Replies)
Discussion started by: robertkwild
2 Replies
2. Shell Programming and Scripting
The below bash runs clamav on all files in DIR and produces virus-scan.log. My question is the portion in bold is supposed to move the infected files, lines not OK, to /home/cmccabe/quarantine. Does the bash look correct? Thank you :).
virus-scan.log
Mon Jan 16 14:39:05 CST 2017... (5 Replies)
Discussion started by: cmccabe
5 Replies
3. Shell Programming and Scripting
My bash below verifies the integrity of all .bam in a directory and writes the out output to a .txt file. That is part one of the script that works. The second part of the bash searches each one of the .txt files for a string "(SUCCESS)" and if found display a message and if it is not found... (6 Replies)
Discussion started by: cmccabe
6 Replies
4. Shell Programming and Scripting
Hi,
This should be a simple one: I run the following commands in bash and ksh respectively but got differenant results:
# ls -l /var/log > /tmp/a
# vi /tmp/a
In bash shell, I got:
^
In ksh, I got:
total 828552
-rw-r----- 1 root root 189 Aug 9 00:00 acpid
-rw-r----- 1 root... (7 Replies)
Discussion started by: aixlover
7 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement where I have to remove duplicates from a file based on the first 8 chars (It is fixed width file of 10 chars length) and whenever a duplicate row is found, its original row's last 2 chars should be updated to all 0's.
I thought of using
sort -u -k 1.1,1.8... (4 Replies)
Discussion started by: farawaydsky
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
i have a directory full of pictures, .jpg files. Half of them begin with "beach_" (for ex beach_123_123456.jpg)
i'm looking for a command to remove the "beach_" from all files in the directory.
thanks (4 Replies)
Discussion started by: robertmanalio
4 Replies
7. UNIX for Advanced & Expert Users
Hi
I have a strange problem. Sometimes when I execute the below command something wierd happens.
rsync -avz -e ssh travegre@travegre.net: ../travegre.net/
the folder named "hm" that is held in travegre.net and is coppied along with all the other folders and data at travegre.net, gets deleted... (4 Replies)
Discussion started by: travegre
4 Replies
8. Solaris
I created a snapshot and subsequent clone of a zfs volume. But now i 'm not able to remove the snapshot it gives me following error
zfs destroy newpool/ldom2/zdisk4@bootimg
cannot destroy 'newpool/ldom2/zdisk4@bootimg': snapshot has dependent clones
use '-R' to destroy the following... (7 Replies)
Discussion started by: fugitive
7 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I would like to remove n lines from all the files in a given directory. If it were one file, I can use the sed 'start, finish d' command.
How can I extend this to an entire directory of files?
Thanks,
Gussi. (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
10. Shell Programming and Scripting
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Discussion started by: laser
6 Replies