11-27-2009
thank you for your help. but my requirement has slightly changed..i have got directory home/ext/eca/pool that contains
below kind of files...
imp_05172_02042008_124956_02042008_123.txt
imp_01342_02042008_124956_02042008_128.txt
imp_02229_25112009_124956_25112009_222.txt
imp_02347_26112009_124956_26112009_332.txt
.....
....
what i want is that my code should pick the file corresponding to current date i.e for today it should pick the file imp_02347_26112009_124956_26112009_332.txt
here the numbers before&after 26112009 doesnt make any difference to me..
i tried following code:
cat </dev/null >inputtomycode.txt;
awk '$0 ~ /^imp_$(date +%d%m%Y) {print $0}' /home/ext/eca/pool> inputtomycode.txt
but its not working properly...some loopholes in code..pls help to patch up the code...
by the way is there any way how to make my code run regularly at specific time..(say my code file name is reg.txt) ..?
Is cron will suffice my need....
---------- Post updated 11-27-09 at 01:46 AM ---------- Previous update was 11-26-09 at 07:57 AM ----------
anybody pls look into above post
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
In a shell script i am running a command which is asking for input.
How can i give that automatically.
I have done this before but for the time being can't recall.
Was something like <|
Thanks (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies
2. Shell Programming and Scripting
i have got many files like this in my folder temp(say)
imp_02042008.txt for date 02-04-2008
imp_03092009.txt for date 03-09-2009
imp_25112009.txt for date 25-11-2009
...................
........
in some folder.
and one of my shell code uses one of the above files based on date.... (0 Replies)
Discussion started by: Maruti
0 Replies
3. Shell Programming and Scripting
Output file template format
<input_file_name>a</input_file_name>
<total_length_size>b</total_length_size>
<log_10_length_size>c</log_10_length_size>
Input_file_1 (eg. sample.txt)
SDFSDGDGSFGRTREREYWW
Parameter:
a is equal to the input file name
b is equal to the total length of... (2 Replies)
Discussion started by: perl_beginner
2 Replies
4. UNIX for Dummies Questions & Answers
This is my input file like this
03,105581,,015,+00000416418,,,901,+00000000148,,,922,+00000000354,,/
49,+00000000000416920,00002/
03,5313236,,015,+00231036992,,,045,+00231036992,,,901,+00000048428,,/
88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/
88,902,+0000000079077,,/... (0 Replies)
Discussion started by: sgoud
0 Replies
5. Shell Programming and Scripting
Hi,
Please help me,its urgent.
I have a tool that i want to run from a shell script. When we run the tool it will ask the user choice to add or delete. When user enter the choice it will then ask how many units he want to delete or add and will add or delete accordingly.
Now I want to... (1 Reply)
Discussion started by: saket18@ymail.c
1 Replies
6. Shell Programming and Scripting
Hi,
I have an issue where i run an command in a shell script.
command >/dev/null
ret=$?
echo ret
If the command returns an error i'm redirecting it to /dev/null.
The prob is if an error comes it expects the user to press return to continue.
And hence the return is not echoed. and the end... (4 Replies)
Discussion started by: subhrap.das
4 Replies
7. Shell Programming and Scripting
Hello there, I am posting to seek help with a KSH script,
I am making a simple calculation program where the user can enter as many numbers as they like, I am getting their input using the read command, however I am not sure how to repeat doing this and storing the input in to new variables... (7 Replies)
Discussion started by: pandapowerbox
7 Replies
8. UNIX for Dummies Questions & Answers
This may be a dumb question, but googling is not giving me an answer. I'm trying to figure out how to refer to an input file in my code.
Lets say i run a script in bash:
"sh shellscript.sh inputfile"
(Inputfile will be variable...whatever file i run the script on)
I wanted to make... (5 Replies)
Discussion started by: legato22
5 Replies
9. Shell Programming and Scripting
Hi All,
I need a favour.
I have a file called "redhat_servers.txt" containing some server names line by line.
When I try to ssh to each server, and I have already done with ssh key-gen stuff. Now, for first time if I do ssh .. I need to type yes I have more than 400 servers...it will take... (4 Replies)
Discussion started by: kumar85shiv
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am newbie tothis forum and also to unix.
i wa shownt help in giving me a acceptable code so that i could add it as batch to be included in the task scheduler.
i use plink and putty to login to my router.
With this i get to the $, linux prompt
there i have to issue a command show... (5 Replies)
Discussion started by: jraju
5 Replies
LEARN ABOUT DEBIAN
x2sys_merge
X2SYS_MERGE(1gmt) Generic Mapping Tools X2SYS_MERGE(1gmt)
NAME
x2sys_merge - Merge an updated COEs tables
SYNOPSIS
x2sys_merge -Amain_COElist.d -Mnew_COElist.d
DESCRIPTION
x2sys_merge will read two crossovers data base and output the contents of the main one updated with the COEs in the second one. The second
file should only contain updated COEs relatively to the first one. That is, it MUST NOT contain any new two tracks intersections (This
point is NOT checked in the code). This program is useful when, for any good reason like file editing NAV correction or whatever, one had
to recompute only the COEs between the edited files and the rest of the database.
-A Specify the file main_COElist.d with the main crossover error data base.
-M Specify the file new_COElist.d with the newly computed crossover error data base.
OPTIONS
No space between the option flag and the associated arguments.
EXAMPLES
To update the main COE_data.txt with the new COEs estimations saved in the smaller COE_fresh.txt, try
x2sys_merge -ACOE_data.txt -MCOE_fresh.txt > COE_updated.txt
SEE ALSO
x2sys_binlist(1), x2sys_cross(1), x2sys_datalist(1), x2sys_get(1), x2sys_init(1), x2sys_list(1), x2sys_put(1), x2sys_report(1)
GMT 4.5.7 15 Jul 2011 X2SYS_MERGE(1gmt)