10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi.,
As we know that using for-loop or while condition, we can only process one by one sequentially, but , lets say this example :
1. under the folder "logs" there are 1000 files
2. each file has one record or line
3. have to perform atleast 7 queries per 3 seconds ,for instance
... (3 Replies)
Discussion started by: alnhk
3 Replies
2. Shell Programming and Scripting
pattern
tin loop 3
tin xarg 1
tin jim 5
tin icon 2
tin tour 4
patn.out
tin loop 3
tin jim 5
tin icon 1
tin tour 2
while read one two three
do
awk '$2 ~ /'"$two"'/' patn.out || while read four five six
do
awk -v n1=$three -v n2=$six '{BEGIN (n2<n1)?1:0}'
done<patn.out... (3 Replies)
Discussion started by: Roozo
3 Replies
3. Shell Programming and Scripting
Hi,
I was trying to write a shell script which reads csv file and sends mail in html format along with tables. Hope i have completed 1st part , but while sending mail i was trying to highlight some rows in the table based on the egrep outcome. If the string exists in line/INPUT, i am trying to... (4 Replies)
Discussion started by: varmas424
4 Replies
4. Shell Programming and Scripting
Hi,
Could you please tell what is the meaning of -z in while loop condition.
For example,
while ; do
echo "*** Enter the age "
readage (3 Replies)
Discussion started by: vidyaj
3 Replies
5. Shell Programming and Scripting
Gurus,
I need to read a line from a file and strip the characters from it and compare the stripped value with the value I pass to the script while executing it. Below is the code for the same. But when i execute the code, it is throwing an error.
#!/bin/ksh
. /home/.i_env
... (14 Replies)
Discussion started by: svajhala
14 Replies
6. Shell Programming and Scripting
Hi All,
My input file name is 1.sh
the contents of file are
cat status2.txt | while read filename
do
echo "$filename"
echo "first content of the file is ${filename}"
echo "second content of the file is ${filename}"
echo "second content of the file is ${filename}"
if } -eq 0 -a... (1 Reply)
Discussion started by: sunitachoudhury
1 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I desperately need your help on my problem:-
I got a folder in my directory that has many files in it. Most of the file's name is starting with certain prefix. Eg: ABC, CDE, EFG, etc. I only want to change file name that is starting from certain prefix and the rest I want them to... (1 Reply)
Discussion started by: balzzz
1 Replies
8. Shell Programming and Scripting
hi
i hav files ha1j ha2m ha3n ha4q ha5s ...like tat im having some 20 files ..and i want to create a folder as the same amount of files which im having wen the condition if loop is satisfied ..
thank you (5 Replies)
Discussion started by: maximas
5 Replies
9. Shell Programming and Scripting
Hi ,
could any one suggest me that how to determine if the first field is numeric and if it is greater than another number then from that point everything else should be printed using awk.
I have tried this
:
awk -v xxxx=$xxxxx '
BEGIN {
enable=0
}
{
print $1
if ( ( $1 !~ "^*$" ... (5 Replies)
Discussion started by: hitmansilentass
5 Replies
10. UNIX for Dummies Questions & Answers
I have two scripts:
SCR1 which takes between 5 seconds to 15 minutes and needs to be run every 23 minutes.
SCR2 which needs to be run every 5 minutes but only if SCR1 is not running at that moment.
How can I do this task?
Best Regards
/Hamid (3 Replies)
Discussion started by: Hamid Afsharazad
3 Replies