Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: shree11
3,038
Posted By shree11
Hi, Previously before appending the error...
Hi,

Previously before appending the error codes i was doing the same thing(i was checking for the NULL condition seperately). But when i wanted to append the error codes into the error records, i...
3,038
Posted By shree11
Hi, Yes you are right. I was using the OUT==$0...
Hi,
Yes you are right. I was using the OUT==$0 above the print statement. So because of that i was not getting teh proper output.This small mistake took most of my time.And thanks to explain it...
3,038
Posted By shree11
Hi, I did the way you suggested but still it's...
Hi, I did the way you suggested but still it's not working fine. It's displaying good records on console and displaying all good and bad records with errorcode attached to the bad records into a...
3,038
Posted By shree11
Hi, I don't know what is going wrong here....
Hi,

I don't know what is going wrong here. Code is working fine but everything is written on to the good file.No bad file is getting created.
The script is :
#!/bin/bash
awk -F, -vDT="$(date...
3,038
Posted By shree11
Error after excecuting the above code is : awk:...
Error after excecuting the above code is :
awk: cmd. line:19: OUT==$0 {print OUT > GOOD; g++;next}
awk: cmd. line:19: ^ syntax error
awk: cmd. line:21: {print OUT > BAD:...
3,038
Posted By shree11
Hi, Still i'm getting some syntax error in...
Hi,

Still i'm getting some syntax error in the below code:
#!/bin/bash
awk -F "," -vDT="$(date +%m%d%Y%H%M)" 'BEGIN {
GOOD = "good_" DT; #Adding timestamp into a GOOD file
BAD = "bad_"...
3,038
Posted By shree11
Hi, your proposal is working fine. But how can...
Hi, your proposal is working fine.
But how can i add the good and bad records on the different files along with the timestamp attached to the good & bad filename. Alos i wanted to count the good...
3,038
Posted By shree11
Hi RudiC , My code is not giving the proper...
Hi RudiC ,

My code is not giving the proper output. I have 20 records in my file .Out of 20 ,4 records are error records and rest 16 are good records. When i run the script which aontains the...
3,038
Posted By shree11
Hi RudiC , Your code alone is working fine...
Hi RudiC ,

Your code alone is working fine but i'm facing problem in redirection.When i implement the similar thing into my code its going wrong. Also in your code, you are printing the results...
3,038
Posted By shree11
Hi, Is there any updates on the above post ?
Hi, Is there any updates on the above post ?
3,038
Posted By shree11
Hi, I tried the similar thing in my code. May...
Hi,
I tried the similar thing in my code. May be because some syantax checks it's giving me an error.
I got the logic you suggeseted but while implementing the same in the entire code somewhere...
14,288
Posted By shree11
@CarloM, I tried with the code: awk '{...
@CarloM,

I tried with the code:

awk '{
stuff
}' file1.txt $(hadoop fs -ls /user/user/data/file2.txt)

where file1 -> reading from the local
fiel2 -> reading the file from HDFS(hadoop)
...
3,038
Posted By shree11
Appending ErrorCodes to the corresponding error record
Hi,

Here i'm using a awk inside bash script to validate the datafile by referring to the configuration file(schema file).
Here the validation check is done for datatype, field length and null...
13,334
Posted By shree11
Hi, Is there any updates on the above post ?
Hi, Is there any updates on the above post ?
14,288
Posted By shree11
Okay, <dirname>/* can be used to process multiple...
Okay, <dirname>/* can be used to process multiple files.

Suppose if i want to process files present in a hadoop HDFS , can i direcctly process using awk script like below as u suggested ?
awk { ...
14,288
Posted By shree11
Passing multiple files to awk for processing in bash script
Hi,

I'm using awk command in bash script. I'm able to pass multiple files to awk for processing.The code i can use is as below(sample code)

#!/bin/bash
awk -F "," 'BEGIN {
...
...
......
29,834
Posted By shree11
Hi, I tried generating public and private...
Hi,

I tried generating public and private keys on local machine. Also copied the id_rsa.pub to the remote machine and renamed to authorized_keys.

Also set the permissions to the .ssh and...
2,695
Posted By shree11
Hi, In my bash script using awk i'm...
Hi,

In my bash script using awk i'm achieving many things and my requirement was different where i wanted to pass the tables names through the command promt. And once i create the table ,i'm...
2,695
Posted By shree11
Hi, Thank you so much for the help. I'm...
Hi,

Thank you so much for the help. I'm able to get the desired output by doing :

#!/bin/bash
awk -F "," -vmytable="${1}" '{
a = "CREATE TABLE " mytable "(x int, y string)";
}' file1.txt...
2,695
Posted By shree11
Passing arguments to a bash script
Hi,

I wanted to pass an argument to a bash script. So that the argument is used inside the awk command inside the bash script.
I know the noraml way of passing argument to a bash script as below...
29,834
Posted By shree11
One more query is can we have multiple ssh...
One more query is can we have multiple ssh directories one created under root user in the path /etc/ssh and other created using user user in the path /home/user/ssh ? Do they conflict each other?
...
29,834
Posted By shree11
Hi Srini, I dint get "If you want to run that...
Hi Srini, I dint get "If you want to run that using your ID, create '.ssh' folder in your home directory" . Here ID in the sense?I'm accessing ubuntu using putty.
29,834
Posted By shree11
Hi, I'm using Ubuntu 10.04 LTS. I...
Hi,

I'm using Ubuntu 10.04 LTS.

I checked the set up of passwordless authentication in this way:.When i excecuted the above command it din't ask me for any password. So i thought it might be...
29,834
Posted By shree11
I have updated/edited my reply where i have...
I have updated/edited my reply where i have mentioned the actual issue.
29,834
Posted By shree11
Hi rbatte1, I have set up the SSH keys for...
Hi rbatte1,

I have set up the SSH keys for passwordless authentication. Also i tried transferring the file from remote machine to a local machine without writing a unix bash script wich is...
Showing results 1 to 25 of 58

 

Featured Tech Videos

All times are GMT -4. The time now is 05:22 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy