10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, this is my first post here.
I'm attempting to write a bash shell script to rm the contents of a directory without deleting the directory, specifically in OS X 10.10 . Here's what I have:
function clear() {
USER="$USER"
DIR=$1
rm -rfv /Users/"$USER"/library/$DIR/*
}
clear... (6 Replies)
Discussion started by: YouNicks
6 Replies
2. UNIX for Dummies Questions & Answers
Hi
How to completely delete directory with all it contents
I try to use rmdir -r but it give error
Thanks
---------- Post updated at 03:10 AM ---------- Previous update was at 02:52 AM ----------
Hi all
I got the solution for my thread
i use mkdir with the option -p
Thanks (1 Reply)
Discussion started by: Tauatioti
1 Replies
3. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
4. Shell Programming and Scripting
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Discussion started by: seeki
2 Replies
5. UNIX for Dummies Questions & Answers
In our shop, we have a situation where a log file from our interface engine software has begun maxing out in file size (reaching the 32-bit "2147483647" limit). Currently, the only way to rectify this is to stop the interface and restart it, which generates a new log. Easy enough, but the... (6 Replies)
Discussion started by: rjhjr64
6 Replies
6. UNIX for Dummies Questions & Answers
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Discussion started by: krishnampkkm
5 Replies
7. Shell Programming and Scripting
Every day a new .zip file is uploaded to a folder and at mid-night the zip file is to be extracted into a /data/ folder, inside a date-named folder.
# This should extract the contents of a zip file into the /data/ folder into a date based folder
/usr/bin/unzip -a -o... (15 Replies)
Discussion started by: worchyld
15 Replies
8. UNIX for Dummies Questions & Answers
Hi ALL,
Can anyone help me out.
I have unix file, I need to delete the contents of the file. Can any one let me know the command to do this.
The file has to be there, but the contents should be deleted.
thanks
Manas (6 Replies)
Discussion started by: manas6
6 Replies
9. Shell Programming and Scripting
Hii,
Please suggest me how can i only remove the contents of the file without deleting it. (3 Replies)
Discussion started by: namishtiwari
3 Replies
10. Shell Programming and Scripting
Hi All,
I want to delete the contents of few files which are really huge in size.
How the same can be done by using sed. Is there any other alternative to sed.
Thanks in advance (10 Replies)
Discussion started by: sumesh.abraham
10 Replies