10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
We use Redhat server , we always use mailq to check any pending mail in mailq , when run the command mailq , it shows all existing pending mail would advise how to write a script to show the pending mails which are older than 24 hours , ( if possible , then send this pending mail info to... (9 Replies)
Discussion started by: ust3
9 Replies
2. Shell Programming and Scripting
Hello
So i have that script collection, in which i have a single script to create a configuration file.
In there, i have multiple occourences of something like this:
prj_title=$(tui-read "What is the TITLE? ($prj_name):")
] && prj_title="${prj_name/_/ }"
They all work as expected, if... (5 Replies)
Discussion started by: sea
5 Replies
3. Shell Programming and Scripting
Hi, I have implement queue but it take last element instead of fist element
#!/usr/bin/perl -w
print "Enter page Access";
chomp ($item = <STDIN>);
my @queue = split /\s+/, $item;
print "Enter a page frame";
$frame = <STDIN>;
if ( $frame >= 3 )
{
$fifo = pop @queue;
print... (1 Reply)
Discussion started by: guidely
1 Replies
4. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
5. Shell Programming and Scripting
Hello everyone!
This is the situation:
I execute this command from a bash script:
telnet 10.99.246.14 6001 >> output.txt
The question is:
How I do to execute this command and empty the buffer when is full?
The script is always running.
Thanks a lot! (2 Replies)
Discussion started by: bobbasystem
2 Replies
6. Shell Programming and Scripting
How do I check if a file is empty in a sh script
I want to test in my shell script if the output file is empty and if it is do one thing and if it isnt empty do another?
any ideas? (8 Replies)
Discussion started by: stolz
8 Replies
7. UNIX for Dummies Questions & Answers
I have the following command prompt perl one liner:
perl -e 's/\(\)\\,\"]//g; s/^\s//g; s/;/\n/g' -pi result1
I tried to move this one liner into a perl script I am practicing with (just started learning perl right now).
I tried the following (I only know how to open a file and output to a... (1 Reply)
Discussion started by: EDALBNUG
1 Replies
8. UNIX for Dummies Questions & Answers
Hi Masters.....
I have problem !!!
I need to check number of records in a file and if it is zero or file is empty i need to do some task.
if ; then
echo "File s empty"
else
echo "Not empty"
fi
so how to check this condition.
I used wc -l < filename.txt => 1 for zero records
same result... (1 Reply)
Discussion started by: shreekrishnagd
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
May I know how to check for empty file in Perl.
Iam missing something, somewhere.
#!/usr/bin/perl
my $open_dir = '/path/';
my $file;
my $ma = "abc_.*.\.psv\$"
opendir(VAR, $open_dir) or die "Can't open $oepn_dir: $!\n";
while( defined ($file = readdir VAR) ) #read all... (1 Reply)
Discussion started by: deepakwins
1 Replies
10. Shell Programming and Scripting
Hello All,
I have written shell script whcih at the max 3 parameters.
When only one commandline argument and other two command line arguments are passed as empty string like
eg : archive ' ' ' '
Then i need to check whether the commandline... (12 Replies)
Discussion started by: rahman_riyaz
12 Replies