Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Shell script help

Name: Anonymous 2010-11-03 22:18

How can I change my code to be able to compare the size of two files.

if [ -f $1 ] && [ -f $2 ] && [ ! $1 -ef $2 ]; then
    size1=$(du $1)
    size2=$(du $2)
    if [ $1 -gt $2 ]; then
     echo "$1 is bigger"
    else
      echo "$1 is smaller"
    fi
fi

Name: Anonymous 2010-11-04 23:39

C++2x:

int main() {
   std::cpp2x::r1::r2::e1::boost::library::type::primitive::integer::bignum count1;
   std::cpp2x::r1::r2::e1::boost::library::file::utils::FileStreamObjectHolderIteratorConstructorOverridable<std::cpp2x::r1::r2::e1::boost::library::file::type::readonly> file1("file1");
   std::cpp2x::r1::r2::e1::boost::library::file::iterators::for::each::byte_in_file<std::cpp2x::r1::r2::e1::boost::library::file::utils::FileStreamObjectHolderIteratorConstructorOverridable<std::cpp2x::r1::r2::e1::boost::library::file::type::readonly>>(file1.begin(), file1.end(), count1.increment_by(1));
   std::cpp2x::r1::r2::e1::boost::library::type::primitive::integer::bignum count2;
   std::cpp2x::r1::r2::e1::boost::library::file::utils::FileStreamObjectHolderIteratorConstructorOverridable<std::cpp2x::r1::r2::e1::boost::library::file::type::readonly> file2("file2");
   std::cpp2x::r1::r2::e1::boost::library::file::iterators::for::each::byte_in_file<std::cpp2x::r1::r2::e1::boost::library::file::utils::FileStreamObjectHolderIteratorConstructorOverridable<std::cpp2x::r1::r2::e1::boost::library::file::type::readonly>>(file2.begin(), file2.end(), count2.increment_by(1));
   std::cpp2x::r1::r2::e1::boost::library::utils::statements::comparison::boolean::if(std::cpp2x::r1::r2::e1::boost::library::types::primitive::integer::bignum::operator>(count1, count2).tostdbool, [std::cpp2x::r1::r2::e1::boost::library::output::stdout.putline(std::cpp2x::r1::r2::e1::boost::library::types::primitive::string("File1 is bigger.")].else(std::cpp2x::r1::r2::e1::boost::library::utils::statements::comparison::boolean::if(std::cpp2x::r1::r2::e1::boost::library::types::primitive::integer::bignum::operator<(count1, count2).tostdbool, [std::cpp2x::r1::r2::e1::boost::library::output::stdout.putline(std::cpp2x::r1::r2::e1::boost::library::types::primitive::string("File2 is bigger.")].else(std::cpp2x::r1::r2::e1::boost::library::output::stdout.putline(std::cpp2x::r1::r2::e1::boost::library::types::primitive::string("They are equal.")))));
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List