Search Results

Search: Posts Made By: deepakgang
1,386
Posted By deepakgang
Super! Got it. Thanks
Super! Got it. Thanks
1,386
Posted By deepakgang
Many thanks.. I guess I can workout the other...
Many thanks.. I guess I can workout the other bits myself :)

Great stuff! Could you please explain what the NR % 3 ... lines do?
1,386
Posted By deepakgang
Merge columns
Hi all - I have a file like below:


A: A1,A2,A3,A4
B: 1,2,3,4
C: z,y,x,w

....

This format repeats


The output should come in a single line merging the first line field with the other...
Forum: Red Hat 09-13-2010
10,665
Posted By deepakgang
Yep - apache is running and i could see the...
Yep - apache is running and i could see the /var/www/html directory ..
Now all I need to put the html page in that directory ..
thanks guys .. all helpful tips :)
Forum: Red Hat 09-10-2010
10,665
Posted By deepakgang
Thanks for that .. i m just trying to do some...
Thanks for that .. i m just trying to do some fancy reporting .. havent done anything with the web server stuff ... ill google the rest of the steps
8,011
Posted By deepakgang
Publishing HTML Page
Hi All,
Thanks for reading.
I am not sure if I am asking this in the correct group. But here it goes:

There is a shell script which does some system checks and creates an html file called...
Forum: Red Hat 09-10-2010
10,665
Posted By deepakgang
Publishing HTML Page
Hi All,
Thanks for reading.
I am not sure if I am asking this in the correct group. But here it goes:

There is a shell script which does some system checks and creates an html file called...
2,021
Posted By deepakgang
Alert for long running commands in script
Hi All,

Is there a way in which a long running command can terminate by itself inside a script? I need something like below:

echo Start
<command>
exit

If the <command> is taking more than...
5,782
Posted By deepakgang
I have found out another simpler way to do what I...
I have found out another simpler way to do what I wanted

First the script will grep for all the error messages in the log files and save them to a file.
It will compare this file with the list of...
5,782
Posted By deepakgang
The date -d doesnt work in my version of unix. ...
The date -d doesnt work in my version of unix.

Therefore I have been trying to follow the approach by vbe to write a specific line to all the log files in every 5 mins.

But I am facing another...
5,782
Posted By deepakgang
Thats a good idea. But the problem is that there...
Thats a good idea. But the problem is that there are a number of log files in which the command is checking.. in that case we will need to append the time in all the log files.
5,782
Posted By deepakgang
Get all lines in a file after particular time
Hi All,

I am lookig for a way to get all the lines from a log file which has been updated 5 mins prior to the system time.

The log file will be like below:

09:01:00 Started polling...
8,729
Posted By deepakgang
Many thanks for that !
Many thanks for that !
8,729
Posted By deepakgang
Many thanks for this. It works ! I am not...
Many thanks for this. It works !

I am not very good at using the complex expressions in sed .. It will be kind of you if you could put in a line or two what the sed command is doing here...
8,729
Posted By deepakgang
Thanks for that. This is working for the...
Thanks for that.

This is working for the value Run. But if I change the value to be printed from "Run" to "Map" ths output is not correct.

Please could you let me know the usage of sed here
...
8,729
Posted By deepakgang
Print matching field using awk
Hi All,

I have a string like below:

str="Hold=True Map=False 'This will map the data' Run=Yes Modify=False"

I want to print the field Run=Yes and retrive the value "Yes". I cannot use simple...
2,948
Posted By deepakgang
Dynamic variable assignment
Hi All,

I have the below scenario:

A file test.cfg with three fields>>

DATA1 DATA2 DATA3

In the script I need to assign each of the fields to variables. The number of fields will not be...
1,511
Posted By deepakgang
Thanks Franklin
Thanks Franklin
1,511
Posted By deepakgang
works like a charm ... thank you very much...
works like a charm ...

thank you very much :)

Could you please throw some light on the use of $ here...? Is it used to get the value of the expression we have provided int he braces?

I...
1,511
Posted By deepakgang
o/p of awk to variable
Hi All,

I have the below file:

sample.cfg
----------

SYS_TEST TEST1 TEST2

and I have set the blow:

NUM=1

I am running the command:

awk -v numb=`expr $NUM + 1` '/SYS_TEST/ {print...
42,614
Posted By deepakgang
or simply can i do the below check: I have the...
or simply can i do the below check:
I have the timestamp of a file in a variable

ts="29 Sep 09:19"

How can I find out if this falls in last 7 days?
42,614
Posted By deepakgang
thanks for that. I cant use the find command...
thanks for that.

I cant use the find command as i dont have the acces to the directory. The directory is accessed by ftp. I ftp to the remote machine and get the listing from the directory into...
42,614
Posted By deepakgang
find files from the past 7 days
Hi All,

I have a file which contains the listing of another directory:


>cat list.dat
-rwxr-xr-x 1 test staff 10240 Oct 02 06:53 test.txtdd
-rwxrwxrwx 1 test staff ...
1,463
Posted By deepakgang
Script to : Search and replace
Hi Chaps,

I have a file which is like below:

>cat file.dat

FIRSTP SECONDP PATH="c:\ftp\dir\test.dat" USER=user1 PASS=*PASSWORD*
Sub1=Dir
Sub2=Test
>

I need to do the below:

1. Take...
Forum: Filesystems, Disks and Memory 08-08-2008
8,906
Posted By deepakgang
calculating the filesystem space
Hi,

Just wanted to confirm that what Im doing is correct to calculate the space allocated to filesystem:

>df -k .
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/test ...
Showing results 1 to 25 of 46

 
All times are GMT -4. The time now is 06:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy