10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
All,
I would like to cut all the lines from the log file for the timestamp . I'm not clear about how to apply grep ,awk here.Can you help me on this ?
My logfile:
**********
Wed Feb 20 03:48:26 2013
Thread 1 advanced to log sequence 400 (LGWR switch)
Thu Feb 21 02:34:23 2013... (1 Reply)
Discussion started by: arul1185
1 Replies
2. Shell Programming and Scripting
This is my command-line code in my script,
passwd=`grep $passwd $userfile | cut -f2 -d: login_users > retrieve`
the
cut -f2 -d: login_users > retrieve
searches and prints the whole column two. what I need is one of the items in the column two only.. what option can I add to my cut... (2 Replies)
Discussion started by: jenimesh19
2 Replies
3. Shell Programming and Scripting
Hi,
my xml files looks something like this
<Instance Name="New York">
<Description></Description>
<Instance Name="A">
<Description></Description>
<PropertyValue Key="false" Name="Building A" />
</Instance>
<Instance Name="B">
... (4 Replies)
Discussion started by: tententen
4 Replies
4. Slackware
not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell.
but how must the command be?
grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d
the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies
5. Shell Programming and Scripting
Hi folks
I am not allowed to install GNU grep on AIX.
Here my code excerpt:
grep_fatal () {
/usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP"
}
Howto the same on AIX based machine?
from manual GNU grep
‘--after-context=num’
Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies
6. Shell Programming and Scripting
Hi
My input file looks like as follows: say a.txt
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss cccccc","P06 09/10","dddddd"
"aaaa cc","224 AW","ss... (5 Replies)
Discussion started by: bittoo
5 Replies
7. UNIX for Dummies Questions & Answers
Hello folks,
I have to (e)grep out a certain pattern e.g. <TAG1> from a huge log file which does not have any space as such.
The thing is that once I have 'grep'ed out the <TAG1> from the file I need to extract the content within the tags, i.e,
<TAG1>Data_To_Be_Extracted</TAG1>
The underlined... (9 Replies)
Discussion started by: Rajat
9 Replies
8. Shell Programming and Scripting
Hello all,
I have some weird problem that kinda baffles me. Say I have the following test file:
claudia:~/tmp$ cat testfile.txt
This is a test line
This is the second test line
And yeah, this is the third test line
Then say I want to tail the file, grep for the word "third" then... (7 Replies)
Discussion started by: sylaan
7 Replies
9. Shell Programming and Scripting
Hi
Is there a way to cut the last two characters off a word or number given that this word or number can be of varying length?
I have tried something like
TEST=`echo $OLD | cut -c 1-5`
where $OLD is a variable containing a number like 1234567 which gives a result of 12345. This is fine... (4 Replies)
Discussion started by: rleebife
4 Replies
10. Shell Programming and Scripting
hi,
i have a simple question:
in hpux 11i;
this cmd :
cat mailtest |grep sekar >test1
gives the output file with the name test1.
i want to remove the line which contains the "sekar" and put the result in the new file....
what is the command for that?.. (2 Replies)
Discussion started by: sekar sundaram
2 Replies