Pls help me out wid below prblm :
i have 5 files A,B,C,D and E located at /home/anubha
I have a file F located at /home/anubha/ed
File F has some records which can be matched in A,B,C,D and E
and another set of files on the basis of these filteration should be created i.e. G,H,I,J and K to be stored at /home/anubha/priya
Plsss help me out....pls pls pls..pls pls pls...
I created below script for the same but it is just creating the files at locations not having any data in it....can you ppl plz lemme kno whr am i making mistakE???
##anusha.sh
1) Please give an exemple :
What do contains A B and E ?
How should look like G H and K ?
2) If you use redirection like ... >> ${MY_FILE} ${MY_FILE} should be a file (not a directory!)
3) Just to take some good habits : don't use "file" as a name of a variable since it already is a name of a unix command.
A,B,E are having 10 columns one of which is msisdn...
filter files F is having a list of msisdn...on the basis of F;A,B,C,D and E will be picked up with relevant rows and should be written as G,H and K..
---------- Post updated at 04:17 AM ---------- Previous update was at 04:14 AM ----------
Quote:
Originally Posted by ctsgnb
1) Please give an exemple :
What do contains A B and E ?
How should look like G H and K ?
2) If you use redirection like ... >> ${MY_FILE} ${MY_FILE} should be a file (not a directory!)
3) Just to take some good habits : don't use "file" as a name of a variable since it already is a name of a unix command.
A,B,E are having 10 columns one of which is msisdn...
filter files F is having a list of msisdn...on the basis of F;A,B,C,D and E will be picked up with relevant rows and should be written as G,H and K..
also below are the examples of the files i am taking into consideration :
F
A/B/C/D/E
G/H/I/J/K
Last edited by Franklin52; 02-16-2012 at 06:34 AM..
Reason: Please use code tags for code and data samples, thank you
Your results will be in the files
A_new
B_new
C_new
...
Of course you can specify abolute path.
The awk code can also easyly be adapted to handle better the naming and the location of the target file i just did a quick shot here.
I haven't tried it so it may require some fix but you can give a try to the following
Your results will be in the files
A_new
B_new
C_new
...
Of course you can specify abolute path.
The awk code can also easyly be adapted to handle better the naming and the location of the target file i just did a quick shot here.
i use some crap version of linux....which doesnt hv sed/awk plugin installed in it....i dunno bt code doesnt wrk wid sed/awk...cn u suggst wid grep or fgrep...
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
The file starts like this:
Directory: <path to the script>
Script: <script fife name>
#!bin/ksh
##Comments
<actual script>
What is the use of the first two lines in the script? What if I save the file without them? What will be the effect? They are not comments. Im very new to this,... (4 Replies)
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients).
I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Hello,
I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file.
For example;-
In the script MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Hi all........
Plss do help me.......in a big trouble... :wall::wall::wall:
I have 3 directories named as :1. /home/shuchi/source
2./home/shuchi/destination
3./home/shuchi/filter
now the problem is /home/shuchi/source has say 2 files with extension .txt as given below :
A.txt
msisdn ... (5 Replies)
Hi all........
Plss do help me.......in a big trouble... :wall::wall::wall:
I have 3 directories named as :1. /home/shuchi/source
2./home/shuchi/destination
3./home/shuchi/filter
now the problem is /home/shuchi/source has say 2 files with extension .txt as given below :
A.txt
Code:
... (0 Replies)
Hi
How can i dynamically read files names from a list file and execute them from a single shell script.
Please help its urgent
Thanks in Advance (4 Replies)