Sponsored Content
Full Discussion: Howto use grep command
Top Forums Shell Programming and Scripting Howto use grep command Post 302677347 by Venkatesh1 on Thursday 26th of July 2012 03:11:52 AM
Old 07-26-2012
Howto use grep command

Hi all ,
i am having a table which contains start date and end date
for ex ..
startdate enddate
12/03/2011 12/04/2012
11/03/2011 20/05/2011
11/04/2011 28/07/2011

how to grep startdate = 12/03/2011
enddate = 28/07/2011

i need output :-
startdate:12/03/2012
enddate:28/07/2011

Any body know the solutoins help me........
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

howto

Dear All , Kindly I have some questions , I need hints or answers please . I have sparc4 , sun solaries 7 , mail server . i have about 5000 users , with no login shell , or home directories for the users . they only have mail boxes in /var/mail dir . now , I do not have any type of... (6 Replies)
Discussion started by: tamemi
6 Replies

2. UNIX for Dummies Questions & Answers

system () howto ??

How do you write a command to : A text line to a file in ./DATA1/archive.log using system () in awk TodayDate Time scriptname.ksh filename.dat system(echo `date '+%D %T` scriptname.ksh >> ./DATA/archive.log) --> syntax error +%D Thanks for your help (0 Replies)
Discussion started by: britney
0 Replies

3. UNIX for Advanced & Expert Users

how to exclude the GREP command from GREP

I am doing "ps -f" to see my process. but I get lines that one of it represents the ps command itself. I want to grep it out using -v flag, but than I get another process that belongs to the GREP itself : I would like to exclude # ps -f UID PID PPID C STIME TTY TIME CMD... (2 Replies)
Discussion started by: yamsin789
2 Replies

4. Shell Programming and Scripting

HowTo: reg expr doing grep "timestamp>$DesiredTime" logfile ?

I know I asked a similar question but I want to know if there is a regular expression existing that with a korn shell cmd, finds any timestamp data records in a file where it is greater then a timestamp in a shell variable ? something like : grep all records where it has a timestamp >... (5 Replies)
Discussion started by: Browser_ice
5 Replies

5. Shell Programming and Scripting

can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello" i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies

6. Solaris

Looking for CIFS howto

I just skimmed through the Administration Guide about LDAP and CIFS. Well that's a whole lot of text. Does someone know a tutorial/introduction with some steps to make? TIA (14 Replies)
Discussion started by: PatrickBaer
14 Replies

7. Shell Programming and Scripting

howto substitute word in vi command mode

Hi I'm trying to substitute word "January" with word "March" in my script but in certain lines only. I have couple words containing pattern that I want to substitute e.g. - log.January.1.array - log_January_1_array_1 - log.January.1.array - log_January_1_array_11 Trying to do cmd below... (9 Replies)
Discussion started by: presul
9 Replies

8. Shell Programming and Scripting

Help with using grep command with copy command

Hi, im taking an entry Unix class, and as part of my lab assignment I have to copy all files in the /home/david/lab3 directory that have the file extension .save to your lab3/temp directory. I'm having trouble getting the grep to do anything worth while I've been trying to do: cp... (6 Replies)
Discussion started by: Critical jeff
6 Replies

9. Shell Programming and Scripting

Howto get only filename from find command in Linux?

Hi every body! I would like to get only filename in the result of find command in Linux but I don't know howto. Tks so much for your helps. (5 Replies)
Discussion started by: nguyendu0102
5 Replies

10. Shell Programming and Scripting

Grep command giving different result for different users for same command

Hello, I am running below command as root user #nodetool cfstats tests | grep "Memtable switch count" Memtable switch count: 12 Where as when I try to run same command as another user it gives different result. #su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
Discussion started by: Pushpraj
10 Replies
1.1.7(8)						  System Administration Utilities						  1.1.7(8)

NAME
1.1.7 - Part of the Pacemaker cluster resource manager SYNOPSIS
crm_report -f "YYYY-M-D H:M:S" [-t "YYYY-M-D H:M:S"] [additional options] [dest] DESCRIPTION
crm_report - Create a tarball containing everything needed when reporting cluster problems OPTIONS
-V increase verbosity -v,--version software version --features software features -f, --from time time to start from: "YYYY-M-D H:M:S" (do not forget the quotes) -t, --to time time to finish at (default: now) -T, --cts test CTS test or set of tests to extract --cts-log CTS master logfile -n, --nodes nodes node names for this cluster only needed if the cluster is not active on the current machine accepts both -n "a b" and -n a -n b -l, --logfile file log file to collect, normally this will be determined automatically -p patt additional regular expression to match variables to be removed (default: "passw.*") -L patt additional regular expression to match in log files for analysis (default: CRIT: ERROR:) -M collect only the logs specified by -l -S, --single-node single node operation; don't try to start report collectors on other nodes -c, --cluster type force the cluster type (corosync,openais,heartbeat,logmaster) -A, --openais force the cluster type to be OpenAIS -C, --corosync force the cluster type to be CoroSync -H, --heartbeat force the cluster type to be Heartbeat -u, --user user ssh username for cluster nodes (default: root) --dest a custom destination directory/file dest a custom destination directory/file EXAMPLES
crm_report -f "2011-12-14 13:05:00" unexplained-apache-failure crm_report -f 2011-12-14 -t 2011-12-15 something-that-took-multiple days crm_report -f 13:05:00 -t 13:12:00 brief-outage 1.1.7 - ee0730e13d124c3d58f00016c3376a1de5323cff April 2012 1.1.7(8)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy