I have searched the forums and other sites and cannot come with the applicable approach for what I am trying to do. I am trying to setup a cron job that executes this script. The script uses iSQL - which is connecting ok - to then query a field and then assign that field to a variable to do an If statement on.
Hi,
I am trying with the below Perl command to print the first field when the second field matches the given pattern:
Code:
perl -lane 'open F, "< myfile"; for $i (<F>) {chomp $i; if ($F[1] =~ /patt$/) {my $f = (split(" ", $i))[0]; print "$f";}} close F' dummy_file
I know I can achieve the same with the following thread: http://www.unix.com/shell-progr
Hi all,
I have a perl program where it checks for the presence of a particular line and prints the record if that line is present. But in the output file, all the entries are not being printed even if the entry has that line. The line to be matched is *FIELD* AV. The program which I wrote is given below. I have no idea where I might be wrong. Any suggestions are welcome.
TechCrunch is rolling into Texas, Washington, California and Massachusetts this year for our patented Meetup+Pitch Off events, parties dedicated to exposing the coolest startups in your home town. We want you to attend. Here’s what’s up:
Austin is happening on May 30 at Stage on Sixth, 508 East 6th St.. Seattle is happening on July 18 at a location that will be announced shortly.
Hi All,
Thanks in Advance
Shell Script or Perl Script
I am working on a shell script.
I'm trying to write a command that gives me some information about a linux system. The command should be a one liner. It should represent the total amount of interrupts, processes and context-switches.
I'm quite new to the linux world, so this isn't an easy thin for me.
I have a shell script that downloads files from a list using wget, and resumes automatically if there is any non-critical error (because of unstable WIFI during storms).
The problem is, I want to write to a "filename.part" file and then remove the .part extension once completed (overwriting and such are handled at that point).
This works for simple urls like "http://myserver.org/myfile.doc", but
Hi ,
I have file FSN.log which contains number 100.
I have a shell script that downloads files from a list using wget, and resumes automatically if there is any non-critical error (because of unstable WIFI during storms).
The problem is, I want to write to a "filename.part" file and then remove the .part extension once completed (overwriting and such are handled at that point).
This works for simple urls like "http://myserver.org/myfile.doc", but