Search Results

Search: Posts Made By: calredd
Forum: Programming 05-11-2017
2,575
Posted By calredd
works great although runs a little slow, thanks a...
works great although runs a little slow, thanks a lot.
Forum: Programming 05-11-2017
2,575
Posted By calredd
Thanks but need the solution in sql query. Its...
Thanks but need the solution in sql query. Its easy to implement using sed/awk.
Forum: Programming 05-11-2017
2,575
Posted By calredd
Need sql query to string split and normalize data
Hello gurus,
I have data in one of the oracle tables as as below:

Column 1 Column 2
1 NY,NJ,CA
2 US,UK,
3 AS,EU,NA

fyi, Column 2 above has data...
3,104
Posted By calredd
Thanks for the PIPESTATUS hint, I think that...
Thanks for the PIPESTATUS hint, I think that might do the trick for me.
3,104
Posted By calredd
Sorry, I wasn't clear. My issue is more to do...
Sorry, I wasn't clear. My issue is more to do with using the "tee" command which is causing the error checking (in the next if statement) to always pass regardless of the actual command whether it...
3,104
Posted By calredd
Question about tee command
I have the following script as shown below where I cat a file and then also tee the output to a file as I have to email the execution of the process to users at the end of the script:


cat...
2,301
Posted By calredd
$ FLAG=file_name $ DIR=file_directory $ awk...
$ FLAG=file_name
$ DIR=file_directory
$ awk -v flag="$FLAG" dir="$DIR" '{print flag, dir,$9}' test*
awk: cmd. line:1: fatal: cannot open file `{print flag,$9}' for reading (No such file or...
2,301
Posted By calredd
Hello Mr Singh, I need to print two...
Hello Mr Singh,
I need to print two variables this time, like:


FLAG=file_name
TIME=file_time
awk -v flag="$FLAG" '{print flag,$9}' test*


In the above code, I need to print TIME...
2,301
Posted By calredd
It worked. Thanks both, really appreciate it.
It worked. Thanks both, really appreciate it.
2,301
Posted By calredd
Need help using awk command
Hello,
I am trying to print a formatted test using awk command and its not working for me:

for ex: there is one file matching the pattern test as shown below

$ ls -ltr test* | awk...
4,626
Posted By calredd
I tried with --yes option without success. ...
I tried with --yes option without success.


$ gpg --yes --output test.gpg --encrypt --recipient janedoe@abc.com test.out
gpg: FC8B84A4: There is no assurance this key belongs to the named user
...
4,626
Posted By calredd
How to use gpg to encrypt data in batch/non-interactive mode?
Hello,
I have to encrypt data using a script in batch mode without being prompted. I can successfully encrypt data but it prompts me to enter (y/N) as shown below. I tried batch flags without no...
5,048
Posted By calredd
Thank you, appreciate it. Your solution seems to...
Thank you, appreciate it. Your solution seems to be working. I will further test it for different scenarios.
5,048
Posted By calredd
1. Is your script passed two operands? Yes, I...
1. Is your script passed two operands?
Yes, I get two parameters passed.

2. Is your script passed one operand with a literal <space><ampersand><space> between the two keys?
No. I get two...
5,048
Posted By calredd
Sorry for the confusion but there are no space in...
Sorry for the confusion but there are no space in the data. I only put spaces to make it easier to understand. Here's how the data will appear:

CITY,COUNTY,STATE,COUNTRY
NEW_YORK,NYC,NY,USA...
5,048
Posted By calredd
Search/grep on row and column wise
Hello,
I have a comma seperate metadata as follows:

CITY ,COUNTY,STATE,COUNTRY
NEW_YORK,NYC ,NY ,USA
NEWARK ,ESSEX ,NJ ,USA
CHICAGO ,COOK ,IL ,USA...
2,309
Posted By calredd
Thanks it works great.
Thanks it works great.
2,309
Posted By calredd
Thanks for the solution. It works as long as the...
Thanks for the solution. It works as long as the a and b doesnt equal to 0. It is possible that we may not have to delete any top and bottom records and in that case the value for top and bottom rows...
2,309
Posted By calredd
Removing top few and bottom few rows in a file
Hi,
I have a requirement where I need to delete given number of top and bottom rows in a flat file which has new line as its delimiter.

For ex: if top_rows=2 & bottom_rows=1

Then in a...
945
Posted By calredd
Thanks v.much.
Thanks v.much.
945
Posted By calredd
Help needed with egrep
Hello folks,
I am having an issue with searching for a pattern using egrep (or grep).

For ex, in the below file. I am searching for all files with a particular pattern but I am not able to...
1,942
Posted By calredd
Thank you all for your suggestion, I can use one...
Thank you all for your suggestion, I can use one of your above solutions.
1,942
Posted By calredd
I can use grep option at the command prompt but i...
I can use grep option at the command prompt but i need to use the list of allowable value from a file (ie list.txt) only as the values are contained in that file only.
1,942
Posted By calredd
Help with egrep
Hi,
I need to search for a exact word in a file and I have a list of allowable values in a list file. I search something like this using egrep -f option:

>egrep -f list.txt data.txt
New
New...
2,657
Posted By calredd
Thank you all for multiple solutions. I will try...
Thank you all for multiple solutions. I will try to use the awk method.
Showing results 1 to 25 of 46

 
All times are GMT -4. The time now is 09:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy