script outputting cant find anything wrong with the script either... :
#!/bin/sh
#count execution script
time=0
while
do
if
then
time=`expr $time + 1`
if
then
echo "The current tick is 100"
fi
fi (2 Replies)
Hi all,
I was wondering if someone could help me writing a simple script on separating files into separate folders.
I have 92 files called various things and I want to separate these folders like so:
Create a folder called "1" and put files 1-23 in it
Create a folder called "2" and put... (5 Replies)
Hey,
I'm very new to AWK and am trying to write a script that counts the number of files in all subdirectories. So, basically, my root has many subdirectories, and each subdirectory has many files.
How can I get the total count? I haven't been able to figure out how to loop through the... (1 Reply)
Hi,
I have some data files in a zipped format.(eg: aa.gz).I would like to know the number or rows in each zip file(May be populate the file name and line numbers into a text file).I know the commands wc -l and gunzip,.But how I will create a shell script for this to extract each files and get... (5 Replies)
Hi All!
I would like to have a script that will count the number of files at the top of the hour of soome directories and mail the results to me.
I was thinking on :
a=`/directory/subdirectory/ | wc -l`
echo "/directory/subdirectory :$a"
b=`/another_dir/subdir/ | wc -l`
echo... (12 Replies)
Hi Guys,
I need to write a script to compare the count of two csv files each having 5 columns.
Everyday a csv file is recived.
Now we need to compare the count of todays csv file with yesterday's csv file and if the total count of records is same in todays csv file and yesterday csv file out... (3 Replies)
hi All, Any one answer my requirement.
I have source location
src_dir="/home/oracle/arun/IRMS-CM"
My Target location
dest_dir="/home/oracle/arun/LiveLink/IRMS-CM/$dc/$pc/$ct"
my source text files check with below example.text file content
$fn "\t" $dc "\t" $pc "\t" ... (3 Replies)
Hi,
Very good wishes to all!
Please help to provide the shell script for generating the record counts in filed wise from the .csv file
My question:
Source file:
Field1 Field2 Field3
abc 12f sLm
1234 hjd 12d
Hyd 34
Chn
My target file should generate the .csv file with the... (14 Replies)
Hello All,
I would need to write a shell script to find the files generation count for the given day and the folder.Presently I am using (ls -ltr *filename* | grep "Feb 19" | wc -l ) from each folder and getting the counts.I would like to create a script which will get the counts under the... (3 Replies)
Discussion started by: ravish383
3 Replies
LEARN ABOUT DEBIAN
shunit2
SHUNIT2(1)SHUNIT2(1)NAME
shunit2 - A unit test framework for shell scripts
SYNOPSIS
shunit2 unitfile
DESCRIPTION
shUnit2 is a xUnit unit test framework for Bourne based shell scripts, and it is designed to work in a similar manner to JUnit, PyUnit,
etc.. If you have ever had the desire to write a unit test for a shell script, shUnit2 can do the job.
You can either run shunit2 directly from the commandline and specify the unit file or directly source the shunit2 executable.
If you directly execute shunit2 and don't specify a unitfile shunit2 assumes a empty testfile and will return without an error message.
EXAMPLE
Simple script to test if 1 equals 1
#! /bin/sh
testEquality()
{
assertEquals 1 1
}
# load shunit2
. shunit2
Execute shUnit2 unit tests directly from the commandline
shunit2 /path/to/unit/file
OPTIONS
shunit2 does not support any commandline options at all. You can either source shunit2 to execute your unit tests or directly run shunit2
as a commandline script.
SEE ALSO
For more information see http://code.google.com/p/shunit2/ or have a look at the installed documentation in /usr/share/doc/shunit2/
AUTHOR
shunit2 was written by Kate Ward <kate.ward@forestent.com>. This manpage was written by Ulrich Dangel <mru@spamt.net>.
2.1.6 03/25/2012 SHUNIT2(1)