10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
How do I loop through files in a specific directory ?
This script is not working!
#! /bin/bash
FILES=/usr/desktop/input/*
For f in $FILES;
do
awk '-v A="$a" -v B="$b" {$6=($1-64)/2 ;$7=((10^($6/10))/A)^(1/B) ; print}' OFS="\t" $f > /root/Desktop/output/$f.txt;
done
... (7 Replies)
Discussion started by: ali.seifaddini
7 Replies
2. Shell Programming and Scripting
is there any other way for someone to see the history of my commands after i've nulled the .bash_history file?
i'm curious. i usually do this each time i want to prevent spies:
cat /dev/null > .bash_history
i work in an environment where multiple people have root access. meaning, we can... (1 Reply)
Discussion started by: SkySmart
1 Replies
3. Shell Programming and Scripting
Hi Friends
I am new to sed programming , i found that the below code can search for the $ToSearch and Replace it with $ToReplace ( $ToSearch and $ToReplace are my variables in my script )
sed "s/$ToSearch/$ToReplace/" $file > $output
mv $output $file
In testing the script i found that... (3 Replies)
Discussion started by: rakeshkumar
3 Replies
4. UNIX for Dummies Questions & Answers
Hi
I tried to empty an existing file (bring the size of the file down to 0). When I used “> myFile” or “cat </dev/null >myFile”, when I do a “ls –la”, the file size shows as 0.
I then wrote 540 lines to the file, and then opened it using vi, I see something like this:
"myFile" 540 lines,... (3 Replies)
Discussion started by: qmqmqm
3 Replies
5. AIX
In our operating procedures, if a workstation has a space problem in the /var filesystem, one of the most frequent case we were told is the size of the /var/adm/wtmp file.
Someone once told me it is dangerous to do this. Is it ?
I cannot say for certain that whomever wrote that procedure is... (2 Replies)
Discussion started by: Browser_ice
2 Replies
6. Shell Programming and Scripting
hi all
i have some files present in a directory
i want to loop through all the files in the directory
each time i loop
i should change the in_file parameter in the control file and load it into a table using sql loader
there is only one table where i have to load alll the files ... (3 Replies)
Discussion started by: rajesh_tns
3 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
Can anyone shed any light on the following problem?
I have 2 columns in File1:
10 8
30 44
50 59
94 96 ... (15 Replies)
Discussion started by: dr_sabz
15 Replies
8. Linux
Hi all i hope someone can help me,
in gnome if you right click on trash, you get another menu appear 'Empty Trash'
what i want to do is be able to edit this command so that it secure deletes the trash, where is that command? so i can edit it. thanks in advance for any help,
Dave
(shred -z -u ) (0 Replies)
Discussion started by: dave123
0 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I'm trying loop through all files in a directory that have a filename starting with 'CC', and process them one by one. Can any provide an example of how I could do this. I've started with:
if test -f CC*
then
#add files to an array
#loop through array and process the file based on... (1 Reply)
Discussion started by: kshelluser
1 Replies
10. Shell Programming and Scripting
Hi,
I have a log file which is constantly being written to by some process. I need to clear that log file on a daily basis.
The problem is that when I issue this command:
echo "" > logfile.log
the file gets filled with nulls thus increasing the size of the file.
Is there a way to... (2 Replies)
Discussion started by: kasie4life
2 Replies