Search Results

Search: Posts Made By: davidtd
4,275
Posted By davidtd
Thanks both of you for the input / suggestions....
Thanks both of you for the input / suggestions. It was really helpful. :)
4,275
Posted By davidtd
UID PID PPID C STIME TTY STAT ...
UID PID PPID C STIME TTY STAT TIME CMD
tomcat 3613 1 18 Mar28 ? Sl 552:53 /usr/bin/java -Djava.util.logging.config.file=/app/apache-tomcat/conf/logging.properties...
4,275
Posted By davidtd
awk if condition help
Hi, I need little help with awk's if condition statement. I have following code:

$ ssh myRemotehost 'ps ww -fu tomcat ' | awk ' { if ($1 == "tomcat") print "tomcat (pid " $2 ") is running... ";...
2,837
Posted By davidtd
Thanks, but how can I process each line instead...
Thanks, but how can I process each line instead of the whole file. I want to process each line, because if I find a line in the file then i process the line and then redirect it to a different file....
2,837
Posted By davidtd
Thanks , but grep does not work the way i ...
Thanks , but grep does not work the way i looking for. May be i did not make it clear, but here is my script with example.

File1
This is shell script forum.
We can ask unix questions
Forum is...
2,837
Posted By davidtd
Line contains a word in shell
Hi,

I am looking for a solution to address following:

I have a file with several lines. If the line contains a specific word I would like to write the line to new file . Can someone please help...
11,094
Posted By davidtd
Thats a good question... To be honest... I have...
Thats a good question... To be honest... I have not thought anything about that scenario but will have to put in some more checks to account for those scenario. Will have to think through it...
7,214
Posted By davidtd
Date format conversion
Hi All,

Can someone please let me know how can i convert the date format in unix as follow:

From: 24 Oct 2011
i.e $(date +'%d %b %Y')


To: 111024
i.e $(date +%y%m%d)


Thanks in advance
11,094
Posted By davidtd
Thanks all for some good tips. But here is how i...
Thanks all for some good tips. But here is how i resolved my problem.
My issue was, date is in the format like: "24 Oct 2011" which is "date +'%d %b %Y'" in shell script, and I wanted to find the...
11,094
Posted By davidtd
Thanks, but this looks little complicated for my...
Thanks, but this looks little complicated for my script... I think i will drop the validation requirement but can some one help me with Calculating yesterday's date from the input. So in this case...
11,094
Posted By davidtd
Date manipulation
In my shell script I take date as a input parameter from command line in the format "21 Oct 2011" which would be
date +'%d %b %Y'

Now i need to do two things here.
1) Validate the date entered...
1,245
Posted By davidtd
Fixing the width of a word
Is there a way to fix the width of the word being printed to a file? I am trying to create an output to a file with columns , like a spread sheet. I have used "\t" to adjust the columns but still it...
8,662
Posted By davidtd
Thanks guys.... you guys are amazing. Please...
Thanks guys.... you guys are amazing. Please continue the good work.
8,662
Posted By davidtd
Thanks guys...it really helped. Appreciate your...
Thanks guys...it really helped. Appreciate your help

---------- Post updated 10-19-11 at 04:56 PM ---------- Previous update was 10-18-11 at 05:16 PM ----------

One more question to related to...
8,662
Posted By davidtd
Sorry my bad, I should have been more specific....
Sorry my bad, I should have been more specific. This is what i see when run the command


egrep a|b|c temp.log
-bash: a: command not found
-bash: b: command not found


The command prompt...
8,662
Posted By davidtd
Thanks, this resolves partial problem but now...
Thanks, this resolves partial problem but now struck with egrep.


egrep a|b|c|d file1


does not work. Is there any other way i can do this. Only way I can think of is using a loop, to loop...
8,662
Posted By davidtd
#!/bin/bash Can pls give an example of doing...
#!/bin/bash

Can pls give an example of doing this? I am trying to use array but have not had success , may be missing something.
8,662
Posted By davidtd
Creating variables dynamically and using it in script?
Hi,

I have a problem that I am trying to solve and would greatly appreciate some input to solve this. I have a file containing variable length of line. Each line in the file has values separated...
8,962
Posted By davidtd
Thanks... that works perfectly... can you please...
Thanks... that works perfectly... can you please explain me the usage '$0~d1{p=1} $0~d2{p=0} p'. So i have a better understanding of this
8,962
Posted By davidtd
reading lines from a file between two search patterns
Hi,

I am new to shell scripting and is working on a script to extract lines from a log file between two time stamps using awk command. After some research I used following command:

awk '/01 Oct...
Showing results 1 to 20 of 20

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