10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a perl script that prompts for a user to enter a password before doing what it does. This works well if I call it directly from a bash script
#!/bin/bash
/path/to/perl/script $arg1 $arg2
But, when I try to enclose this within a while read loop, the perl script is called but... (1 Reply)
Discussion started by: prafulnama
1 Replies
2. Shell Programming and Scripting
Good morning, I appreciate any assistance that I can get from the monks out there. I am able to get this to work for me so that I can do a hostname lookup if I only specify one hostname in the script. What I want to do is have a file with hostnames and do lookups for each name in the file. Here is... (1 Reply)
Discussion started by: brianjb
1 Replies
3. Shell Programming and Scripting
use strict;
use warnings;
open (my $fhConditions, "<input1.txt"); #open input file1
open (my $fhConditions1, "<input2.txt");#open input file2
open (my $w1, ">output1");
open (my $w2, ">output2");
our $l = 10;#set a length to be searched for match
our $site="AAGCTT";#pattern to be matched... (1 Reply)
Discussion started by: anurupa777
1 Replies
4. Shell Programming and Scripting
Hi all,
i write a script c shell
set i = 1
while ( $i <= $#array )
echo "$array"
@ i++
end
i want to set it to i = i +2 in that statement . Can anybody help me?
---------- Post updated at 02:46 PM ---------- Previous update was at 02:35 PM ----------
anybody not how to solve it??? (2 Replies)
Discussion started by: proghack
2 Replies
5. Infrastructure Monitoring
Another newbie question... I can not figure out how to get this running using a loop. Here is what I have now.
#!/usr/bin/perl
use SNMP::Info;
$list="list.list";
open(DAT, $list) || die("Can't Open List");
@raw_data=<DAT>;
close(DAT);
foreach $dest (@raw_data)
{... (2 Replies)
Discussion started by: mrlayance
2 Replies
6. Shell Programming and Scripting
#! /usr/bin/perl
$exp = "y";
while ($exp !="n") {
system "clear"; # clear the window
print "\nEnter the number of Widgets ordered: ";
$widgetcount = <STDIN>; #vairable to save the number of total widgerts ordered
chop $widgetcount;
print "\nEnter the number of Gidgets ordered:... (2 Replies)
Discussion started by: navjot99cheema
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have thousands of files in a directory that have the following 2 formats:
289620178.aln
289620179.aln
289620180.aln
289620183.aln
289620184.aln
289620185.aln
289620186.aln
289620187.aln
289620188.aln
289620189.aln
289620190.aln
289620192.aln....
and:
alnCDS_1.fasta (1 Reply)
Discussion started by: greptastic
1 Replies
8. Shell Programming and Scripting
Hi Guyz
I designed a script that can compare 2 columns(values) of single file and gives the closest numbers to the first column by comparing the numbers in first column with second and it works in a single file.
Now I'm trying to design a new script with 2 objectives for 2 files (not a single... (4 Replies)
Discussion started by: repinementer
4 Replies
9. Shell Programming and Scripting
i have a script that will read each line and then grep a particular pattern and do some_stuff. Below the script
while read j
do
q1=0
q1=`$j | grep 'INFO - LPBatch:' | wc -l`
if
then
$j | tr -s " " | cut -d " " -f8,42,43 >> nav1.txt
fi
q2=0
q2=`$j | grep 'INFO - Number of Intervals... (12 Replies)
Discussion started by: ali560045
12 Replies
10. Shell Programming and Scripting
I am writing a shell script that simulates the `wc -w` command without actually using wc itself. My problem is that the script will only read the first line of the file and just keep looping through it. I have tried both while and for loops and got the same result. Can anyone help?
... (1 Reply)
Discussion started by: MaxMouse
1 Replies