I have written down a simple perl program to replace a string from a word file. My script does'nt seem to work. Any pointers to make it work will be appreciated. The code is given below.
#!/usr/bin/perl
while (<>) {
open(FILE,$_);
while (<FILE>) {
s/This/I did it/g;
}... (6 Replies)
I found when i run this code
#! /bin/ksh
error_log="/tmp/log3.txt"
while
read line ;
do
show=`grep "$line" $error_log|tail -1`
case $line in
"Finished")
msg="VOLUME_MGR_ERROR"
echo $line
... (1 Reply)
I keep having problems when exicuting this file. It always gives me the error message "36: Syntax error: Unterminated quoted string"
If someone could help me edit this it would be much appreciated.
#!/bin/sh
#
# This will continue adding numbers
# untill the total is greater than 1,000
#... (5 Replies)
Hello all! I need help in debugging following script. I have no idea where I am going wrong.
#!/bin/bash
for p1 in A1 TM MP
do
for p2 in A1 TM MP
do
for mp1 in N1 N2
do
for mp2 in N1 N2
do
for mp3 in N1 N2
do
for mp4 in N1 N2
do
for... (7 Replies)
I'm trying to pull a google calendar (successful) and then put the contents into a mysql db (almost successful). On one of the field I keep getting an encode error:
#!/usr/bin/python
from xml.etree import ElementTree
import gdata.calendar.data
import gdata.calendar.client
import... (12 Replies)
I get this error when I try to compile following C program
#include <stdio.h>
#include <strings.h>
#define LEN 80
int main(void)
{
int mess, flag = 1;
int first = 0, last = 0;
printf("Enter a message: ");
gets(mess);
if (strlen(mess) > LEN)
... (3 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hi Friends,
Could you please tell me why i am getting the below eror while working with awk. I am confused :confused: what to do ?
awk: 0602-591 String 1,9,20,6,6 cannot be longer than 399 bytes. The source line is 1.
The error context is
>>> <<<
awk: 0602-591... (2 Replies)