Sponsored Content
Top Forums Shell Programming and Scripting shell scripting and programmming Post 302492958 by homeboy on Wednesday 2nd of February 2011 02:32:06 AM
Old 02-02-2011
a more complicated code:
Code:
grep "\b1.1\b" infile -A1 | tr '\n' ' ' | sed -e 's/date.*\(author:.*;\)/\1/' | awk 'BEGIN{FS="[ ;:]"}{print $1,$2,$3":"$5}'

Does this works?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

2. Programming

I am a newb to the C programmming language how do I make it interesting?

I am a newb to the C programmming language how do I make it interesting? (6 Replies)
Discussion started by: yunusabd786
6 Replies

3. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

4. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

5. Shell Programming and Scripting

shell scripting and programmming

what is much better ????? Perl or Shell Scripting???? (1 Reply)
Discussion started by: harjinder
1 Replies

6. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

7. Shell Programming and Scripting

shell scripting and programmming

how to set shell env variable from perl script ?? (1 Reply)
Discussion started by: harjinder
1 Replies

8. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

9. Shell Programming and Scripting

shell scripting and programmming

hi i was trying the perl scripting with the new perforce and found the various issues which says u need to define a package in it..... wat can be the reason for this ....is there any basic requirement we need to install for running the perl scripts on perforce.... thanks kullu:rolleyes: (0 Replies)
Discussion started by: kullu
0 Replies

10. Shell Programming and Scripting

shell scripting and programmming

hi , i was trying a small script in sed as my main motive is to apppnd a sentence before a line and after a line. e.g this is the sentence which is present in many files and i want to append 2 more sentences in this sentence of mine. tanvi is good girl the result should come out as ... (1 Reply)
Discussion started by: kullu
1 Replies
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 07:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy