10 More Discussions You Might Find Interesting
1. Answers to Frequently Asked Questions
I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies
2. UNIX for Beginners Questions & Answers
Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt .
I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies
3. Shell Programming and Scripting
I get the date that's inside a text file and assigned it to a variable. When I grep the date from the file, I get this,
Not After : Jul 28 14:09:57 2017 GMT
So I only crop out the date, with this command
echo $dateFile | cut -d ':' -f 2,4The result would be
Jul 28 14:57 2017 GMT
How do I... (3 Replies)
Discussion started by: Loc
3 Replies
4. Shell Programming and Scripting
HI,
I have csv file with records as shown below.
4102,Bangalore,G10,21,08/17/2011 09:28:33:188,99,08/17/2011 09:27:33:881,08/17/2011... (1 Reply)
Discussion started by: raghavendra.nsn
1 Replies
5. UNIX for Dummies Questions & Answers
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies
6. Shell Programming and Scripting
Hi,
Anybody knows how to get what date was 28 days ago of the current system date through UNIX script.
Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies
7. Shell Programming and Scripting
OK I have a simple awk script:
$ awk '/03\/11\/10/' foofile|awk -f finderrors.awk
I want to use in the ksh script to so that I can do something like this:
#!/bin/ksh
TODAY=`date +"%D"`
awk /$TODAY/ foofile|awk -f finderrors.awk
The problem I am having is (I believe) is with the special... (3 Replies)
Discussion started by: bike4life
3 Replies
8. Shell Programming and Scripting
I am currently running the following Korn shell script which works fine:
#!/usr/bin/ksh
count=`db2 -x "select count(*) from schema.tablename"`
echo "count"
I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Discussion started by: sasaliasim
9 Replies
9. UNIX for Dummies Questions & Answers
i'm facing problems in using system date in a awk script...
it should display the date in a report in mm/dd/yy format..
please help me in this case..
thanks (3 Replies)
Discussion started by: Manish4
3 Replies
10. Shell Programming and Scripting
Hi
I get problems when using the following command :
cat logs | awk -F";" '{ system("date -d "1970-01-01 UTC+0100 $1 seconds""); }'
date: date invalide `1968641199401200'
date: date invalide `1968641199381709'
this is what i have in my log file :
cat logs
1199401200;a... (3 Replies)
Discussion started by: arag0rn
3 Replies