Making more from a one line shell script

| 0 Comments | 0 TrackBacks
 #!/usr/bin/perl open (FILE, $ARGV[0]) or die "Error: Cannot open file.\n"; @line = ; close FILE; foreach (@line) { chomp; print "echo \"" . "------------------" . "\"" . "\n"; print "echo \"" . "started - `date`" . "\"" . "\n"; print "echo \"" . $_ . "\"" . "\n"; print $_ . "\n"; print "echo \"" . "finished - `date`" . "\"" . "\n"; print "\n"; } 

No TrackBacks

TrackBack URL: http://baldwinsung.com/cgi-bin/mt-tb.cgi/60

Leave a comment

Recent Entries

Oracle Table & User Permissions
Example of Oracle Table & User Permissions: CREATE TABLESPACE MYDATABASE_ts DATAFILE '/db/MYDATABASE/MYDATAVASE.dbf' SIZE 10M AUTOEXTEND ON NEXT 10M DEFAULT STORAGE…
Configuring NTP on Linux CentOS & RHEL
yum install ntp -y mv /etc/ntp.conf /etc/ntp.conf.orig cat > /etc/ntp.conf << EOF restrict default kod nomodify notrap nopeer noquery…
Sun Disk Mirroring using Software RAID DiskSuite/ODS/Volume Manager
Duplicate Disk Layout prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2 Configure replicas on both disks metadb -afc 3 c1t0d0s7…