10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have requirement to search for a text in the file and retrieve required lines that is user defined with unix command.
Eg:
Find the text UNIX in the below file and need to return Test 8 & Test 9
Test 1
Test 2
Test 3
Test 4
UNIX
Test 5
Test 6
Test 7
Test 8
Test 9
Result can... (8 Replies)
Discussion started by: Arunkumarsak4
8 Replies
2. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
3. Shell Programming and Scripting
Hi Guys,
I want to display lines from Solaris syslog file but with 2 dates range. I have some similar solution (https://www.unix.com/shell-programming-scripting/39293-grep-log-file-between-2-dates-4.html) which works fine but as you know syslog has different date format (Jan 22) so this is not... (1 Reply)
Discussion started by: prashant2507198
1 Replies
4. Shell Programming and Scripting
Hi,
I have one file, say file 1, that has data like below where 19900107 is the date,
19900107 12 144 129 0.7380047
19900108 12 168 129 0.3149017
19900109 12 192 129 3.2766666E-02
... (3 Replies)
Discussion started by: Wynner
3 Replies
5. Programming
Plz tel me how to retrieve some specific set of lines from a file and store it in a char buffer.I am seperating each record by ":"
22:abc:4
hardware:cd:xyz:2
hardware:eth:abc:6
hardware:mouse:xyz:3
hardware:ram:xyz:1
23:cde:3
hardware:cd:xyz:2
hardware:eth:abc:6
hardware:ram:xyz:1
... (3 Replies)
Discussion started by: vigneshinbox
3 Replies
6. Shell Programming and Scripting
Hi All,
I want a shell script which can display the file with in the date range.
For Example I have 15 files with the following format
abc_01-01-2009.txt to abc_15-01-2009.txt.
Now I want to have the files between 4th of jan to 12th files.
How can I acheive this.
Advance... (1 Reply)
Discussion started by: fareed_do
1 Replies
7. Shell Programming and Scripting
Hi,
I need to retrieve the lines which fall under the given date range.
eg:In a log file,i have the lines which will have the timestamp.
the input will be some date range.eg: from date:03/Jan/2008,to date:24/Jul/2008.so now i want to retrieve the lines
which have the timestamp between these... (5 Replies)
Discussion started by: Sharmila_P
5 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I am a java devloper putting my hands on shell scripts.
Honestly it sounds coool and interesting
Presently I got stuck with the following requirement.
Get the messages from file. The messages in the file are as follows:
date|message1
date|message2
.
.
.
date is of... (2 Replies)
Discussion started by: ambharish
2 Replies
9. Shell Programming and Scripting
I am reading a file that contains over 5000 lines and I want to assign it to a shell variable array (which has a restriction of 1024 rows). I had an idea that if I could grab 1000 record hunks of the file, and pipe the records out, that I could perform a loop until I got to the end and process 1000... (5 Replies)
Discussion started by: beilstwh
5 Replies
10. UNIX for Dummies Questions & Answers
I need to list only file names of a specific date from the command ls -lt.
:confused: (2 Replies)
Discussion started by: Shamwari
2 Replies