10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
can anyone spot a problem with the below:
$
$ cat getopts.sh
#!/bin/sh
usage() { echo "myscript.sh local /tmp data.txt 600s -query" 1>&2; exit 1; }
while... (4 Replies)
Discussion started by: SkySmart
4 Replies
2. Shell Programming and Scripting
Hi,
I tried to find out the users under the file /etc/shadow , where the value should be 90, which shouldn't be less or more than that.. if its more or less, it should give me the output as BAD.
{
print (GOOD);
}
Else
{
print (BAD);
} (10 Replies)
Discussion started by: gsiva
10 Replies
3. Shell Programming and Scripting
$ perl -e '@f=("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","1","911"); print join("\t",@f)."\n";'
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ... (5 Replies)
Discussion started by: carloszhang
5 Replies
4. Shell Programming and Scripting
my $sysdate = strftime('%Y-%m-%d', localtime );
biDeriveByDate('Table_Str',$sysdate,\@lIndx,\@lResVals)
In a perl script, when I'm trying to pass $sysdate to some external function it's not working since $sysdate is passed as a string mentioned above but my function is expecting a date value... (1 Reply)
Discussion started by: Devesh5683
1 Replies
5. Shell Programming and Scripting
Hi,
I have a perl script which is a part of a shell script which read lines from a flat file(which is generated as part of a script after a series of bteq/fexp) and assigns a value for each object in the file based on the type of file name. (i.e extensions like .bteq/.ctl/.ksh etc)
For example,... (1 Reply)
Discussion started by: yohasini
1 Replies
6. Shell Programming and Scripting
Hi, How to use Image::size function ? because I want to list all image thatare less than size pixels in horizontal resolution. so here is my code :
#!/usr/bin/perl -w
use Image::Size;
use constant GIVEN_WIDTH = '100';
my @filtered_images = grep { my @d = imgsize( $_ ); $d < GIVEN_WIDTH }... (8 Replies)
Discussion started by: guidely
8 Replies
7. Shell Programming and Scripting
Hi everyone! Here's my first thread...
I have to recognize if a TIFF image is corrupted or not.
I've always usedfile -b to identify file type, but I've experienced that sometimes it returns "TIFF image data, little endian" even if the image is truncated or something.
Do you know another trick... (6 Replies)
Discussion started by: canduc17
6 Replies
8. Shell Programming and Scripting
Hello..
In my code i use the following function:
$epochTime = timegm($sec, $min, $hour, $day, $month, $year)
The problem is that when $day==31, i get the following error:
Day '31' out of range 1..30 at unrated_namp_program line 113
Any idea how to overcome this???
Thank you very... (5 Replies)
Discussion started by: chriss_58
5 Replies
9. Shell Programming and Scripting
Does anyone know a shell command that identifies the functions from a C file? Thank you (7 Replies)
Discussion started by: xinfinity
7 Replies
10. Shell Programming and Scripting
I have perl script as follow.
------------------------------------------------------------------------
#! /usr/bin/env perl
use strict;
sub printLines
{
print "Inside the function.............\n";
my (@file , $count , $key ) = $_;
print $count , $ key ; #... (2 Replies)
Discussion started by: avadhani
2 Replies