Need some Help for file filteration and saving the output in other directory
Hi all........
Plss do help me.......in a big trouble...
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
B.txt
/home/shuchi/filter has one file as below :
msisdn
--------------
now on the basis of file present in /home/shuchi/filter i need to have 2 subfiles with the same name as A.txt and B.txt in /home/dstst/destination folder as given below :
A.txt
B.txt
i have to write a script which will read files present in /home/shuchi/source one by one i.e. A.txt and B.txt and match them with file present in /home/shuchi/filter and on the basis of msisdn and store the result in /home/shuchi/destination directory.I have to use grep or fgrep as some crappy version of unix being used and awk and sed are not supported ............it would be a grttttttttt help...........
~Priya...........
Last edited by Franklin52; 02-20-2012 at 04:46 AM..
Reason: Please use code tags for code and data samples, thank you
How would I pass awk output to a perl variable?
For example, I want to save the value in the 4th column into the variable called test. My best guess is something as follow, but I am sure this isn't correct.
$test = system("awk '/NUMBER/{print \$4}' $_"); (8 Replies)
Hello,
I have a shell script containing a command string in the following format:
command1 | command2 | cut -c9-16
The output from this is a record number (using characters 9-16 of the original output string) e.g. ORD-1234
I wish to save this value to a variable for use in later commands... (4 Replies)
Good morning everyone,
i am looking to know how to save the output of a command and reuse it again within a script
i already tired this one but it didn't work
TEMPDIR=/dir1/dir2
My_command> $TEMPDIR/$TEMPFILE
rm $TEMPDIR/$TEMPFILE*
it keeps saying "cannot write to a... (15 Replies)
I am ssh to many servers to get some information... however sometimes the server is unreacheable and i am getting an error. I want to save that output to a file but I am not able to do so...
I want to be able to save output of bash into a file.. so when I run this command on a script
ssh... (5 Replies)
Hiii all...
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.... (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 Folks,
I have a directory at /usr/local/aa and there is other directory where I have checkout the code through svn checkout command ( /opt/app/fgh) now I can apply svn log command here as shown below
$ cd /opt/app/fgh
svn checkout <url>
svn log
shows me the log on console .
please... (3 Replies)
Shell : bash
OS : Oracle Linux 6.4
I want to save the ouput of a nohup command to file other than nohup.out . Below are my 3 attempts.
For both Attempt1 and Attempt2 , the redirection logs the output correctly to the output file. But I get the error "ignoring input and redirecting stderr to... (7 Replies)
Hi,
i need help with a file creation of an output program. I've got a program that with #find creates an output for each files in a directory.
If i give this command :
-o spec$(date -u +%Y%m%dt%H%M)
it creates just one file, overwriting all the others since it is the creation date .... (2 Replies)
Hi,
I am working on a script where I am adding adding colors to few of the info in the output.
Now , after that is done , I see colour codes in log files which I don't want to see.:mad::mad::mad::mad:
So , I tried using sed command in script as below which gives me o/p (new.log) as blank file... (7 Replies)