10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
2. Shell Programming and Scripting
Hi everyone,
I want to know, if there is a way to modify one line in a text file with unix script, with out re-writing all the file.
For example, i have this file:
CONFIGURATION_1=XXXX
CONFIGURATION_2=YYYY
CONFIGURATION_3=ZZZZ
supose i have a command or function "modify" that... (7 Replies)
Discussion started by: Xedrox
7 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a Shell script that looks for all text files in your home directory (including subdirectories).
List... (3 Replies)
Discussion started by: rollinator
3 Replies
4. Shell Programming and Scripting
Hello!
I've got a very big file (from tokenization) which has one word for line.
How is it possible then to rebuild the "original" text, knowing that <s> and </s> are the sentence-delimiters?
My file looks like this:
<s>
&&
tanzania
na
Afrika
kwa
ujumla
ambiwa
na
taifa
kubwa... (6 Replies)
Discussion started by: mjomba
6 Replies
5. Shell Programming and Scripting
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies
6. Shell Programming and Scripting
Hi All ,
I want to delete files from /tmp directory created by "xxxx" id.
because i got the list says more than 60 thousand files were created by "xxxx" id since 2002.
The /tmp directory has lot of files created by different user ids like root,system etc..
But, i need a script to... (2 Replies)
Discussion started by: vparunkumar
2 Replies
7. Shell Programming and Scripting
im a new student in programming and im stuck on this question so please please HELP ME. thanks.
the question is this:
enter a command to delete all files that have filenames starting with labtest, except labtest itself (delete all files startign with 'labtest' followed by one or more... (2 Replies)
Discussion started by: soccerball
2 Replies
8. Shell Programming and Scripting
Sed: Delete lines in files that contain other than 'a-z' ,'0-9', '.' and '-'
Hello,
I'm looking for a shell command or maybe a small php loop to delete lines in files.txt (in the same directory) that contain character other then 'a-z' ,'0-9', '.' and '-'
All line that have characters like... (4 Replies)
Discussion started by: devlin
4 Replies
9. Linux
I'm attempting to print to a networked konica printer. No linux drivers that I know of exist, but we've always used HP 5si drivers and have had good results.
We just loaded a box up with CentOS 5, and now when we print any sort of file from the command line (lp -dkonica <filename>), the text is... (0 Replies)
Discussion started by: fender177
0 Replies
10. AIX
Root emailed me this message and thats ok it is supposed to. The thing that concerns me is that the ADMIN password came in plain text. I Xed it out for the purpose of this message of course.
Is there a way for me to set this so the password comes encrypted? OR is not included at all in the... (4 Replies)
Discussion started by: rocker40
4 Replies