Shell scripting questions


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell scripting questions
# 1  
Old 08-24-2010
Shell scripting questions

I have a file like this. Pls help me to solve this.
08-24-2010 10:22:34,xxxxxxxxMessage : 111
08-24-2010 10:24:38,xxxxxxxbMessage : 000
08-24-2010 11:28:11,xxxxxxxcMessage : 111
08-24-2010 11:32:35,xxxxxxxdMessage : 111
08-24-2010 11:32:35,xxxxxxxeMessage : 111
(I should look for Message : 111 )
The output should be like this
08-24-2010 10:22:34
08-24-2010 11:28:11 to 08-24-2010 11:32:35


Another Example:
08-24-2010 10:22:34,xxxxxxxxMessage : 111
08-24-2010 10:24:38,xxxxxxxbMessage : 111
08-24-2010 10:24:39,xxxxxxxbMessage : 111
08-24-2010 10:24:40,xxxxxxxbMessage : 000
08-24-2010 11:28:11,xxxxxxxcMessage : 111
08-24-2010 11:32:35,xxxxxxxdMessage : 111


The output should be
08-24-2010 10:22:34 to 08-24-2010 10:24:39
08-24-2010 11:28:11 to 08-24-2010 11:32:35
# 2  
Old 08-25-2010
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting questions, remote access

Hi, Background: There are 2 servers server1 and server2 In server1 i have my script to perform a functionality from the script in server1 i m calling a script named action in server2. The script action has to check the size of a file in a particular location in server1, if the size of the file... (1 Reply)
Discussion started by: jayii
1 Replies

2. Shell Programming and Scripting

beginner scripting questions User variables

If there's anywhere to look this up, it would be just as helpful. I googled and really couldn't find anything relative to this. ok... General Variables 1) When creating a script I made a file "prog1.sh" does it matter if the end is .sh or is this what has to be done like prog.bash or... (4 Replies)
Discussion started by: austing5
4 Replies

3. Homework & Coursework Questions

Scripting questions

I have two scripts and wish to finish the labs in two days, I am not sure how to make these work though. Any help would be appreciated, a step by step guide would be great! Q1) Complete the following instructions and submit the questions and answers from this lab to your tutor. Please... (1 Reply)
Discussion started by: noobie123
1 Replies

4. 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

5. 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

6. 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

7. Shell Programming and Scripting

Shell/commands/scripting/c questions

1. Can anyone explain me what the line x=signal(SIGINT,nh); does? 2. How do I write a command to print the longest line in a file? 3. How do I write a command to print the last word of every line of a file using sed? 4. What exactly does this line do? :%s/^\(\)\(\)/\2\1/g^M... (3 Replies)
Discussion started by: Necrologist
3 Replies

8. Shell Programming and Scripting

few small scripting questions

hello everyone, i have a couple of questions about programming with shell scripts. -My question is, how do you find out how long a sequence of numbers that has just been entered is. for example If i enter 12345 the length here is 5 and 23456789 the length here is eight. I want to be able... (1 Reply)
Discussion started by: bebop1111116
1 Replies

9. 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

10. UNIX for Dummies Questions & Answers

questions on ftp shell scripting

did a search but was not allowed to use 'ftp' because its too short of a word. for some reason, i can't seem to remember anything about ftp shell scripts - would someone please refresh my memory on the syntax and maybe give a short example? thanks for the time. (5 Replies)
Discussion started by: psyjoniz
5 Replies
Login or Register to Ask a Question