10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through...
Script that i am using is below :
#!/bin/bash
sum=0
for i in $@
do
sum=$sum+$1
echo $sum
shift
done
I am executing the script as... (3 Replies)
Discussion started by: mukulverma2408
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Can someone help me to get the complete files size (sum) over a perod time (1 day,2days)in a directory.
eg:
Directory :ABC
I have a1,a2,a3 files are created in last 24 hours so I need to get the some of all these files.
I am using the below find command but its giving me the... (1 Reply)
Discussion started by: gaddamja
1 Replies
3. Shell Programming and Scripting
Hi Experts,
I have a script like
$ORACLE_HOME/bin/sqlplus username/password # << ENDSQL
set pagesize 0 trim on feedback off verify off echo off newp none timing off
set serveroutput on
set heading off
spool Schemaerrtmp.txt
select ' TIMESTAMP COMPUTER NAME ... (5 Replies)
Discussion started by: welldone
5 Replies
4. UNIX for Advanced & Expert Users
Hello
first, truth been told, I'm not even close to be advanced user. I'm posting here because maybe my question is complicated enough to need your expert help
I need to use awk (or nawk - I don't have gawk) to validate some files by computing the total sum for a large numeric variable.
It... (1 Reply)
Discussion started by: cwitarsa
1 Replies
5. Shell Programming and Scripting
Hi ,
I am trying to write something to find the size of particular type of files in a directory & it's subdirectory and sum the size .. These types of file are found at directory level or its subdirectories level ..
#!/bin/ksh
FNAME='.pdf'
S_PATH=/abc/def/xyz
find $S_PATH -exec ls -lad... (4 Replies)
Discussion started by: Vaddadi
4 Replies
6. Solaris
Hi,
I wanted a script to find sum of files for a particular date, below is my script
ls -lrt *.req | nawk '$6 == "Aug"' | nawk '$7 == "1"'| awk '{sum = sum + $5} END {print sum}'
However, i get the error below
/usr/bin/ls: arg list too long
How do i fix that.
Many thanks before. (2 Replies)
Discussion started by: beginningDBA
2 Replies
7. Shell Programming and Scripting
How do I write a bash or ruby or perl or groovy script to print all the files in my directory tree that are one-to-two years old, the size of each file, and the sum of file sizes and then delete them?
I was using
find . -atime +365 -exec rm '{}' \;
but the problem was that I could not... (5 Replies)
Discussion started by: siegfried
5 Replies
8. Shell Programming and Scripting
Hello Friends,
When i type du -sh *.jar | sort -n under a library directory i get a result similar below output:
1M 1.jar
2.4M 2.jar
4.5M 3.jar
. .
. .
. .
1K (n-2).jar
15K (n-1).jar
77.7K n.jar
I want to sum up the size... (1 Reply)
Discussion started by: EAGL€
1 Replies
9. Shell Programming and Scripting
Dear Friends,
I wrote a script that get the size of specific files in a specific space directory. To get the total size I wrote a function in that script.
So far I am not convinced that function is working correctly.
Do you mind tell if there is anything wrong.
I am on SOLARIS (KSH)... (4 Replies)
Discussion started by: Aswex
4 Replies
10. Shell Programming and Scripting
Hi,
I have one file stat.
Stat file contents are as follows: for example.
H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000
H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000
Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies