Search Results

Search: Posts Made By: gopskrish
9,925
Posted By gopskrish
Hi npolayan, I can able to create the temp...
Hi npolayan,

I can able to create the temp file with appropriate values to look at but when i executed the awk statement
awk '{ for ($0 in `cat temp`)
key[$0]++
if(key[$0] < 2 ) print $0
}'...
9,925
Posted By gopskrish
Hi Guys, It is working fine when i...
Hi Guys,

It is working fine when i supstitute nawk with awk command. Anbu, thanks a lot.

When i pass the exact string that line gets deleted in the outputfile.

But i want to pass a part of...
9,925
Posted By gopskrish
Hi Anbu, I was off for few days and hence...
Hi Anbu,

I was off for few days and hence the delay in replying.
I tried your stuff but I am getting this error
awk -v check_val="$1" '{
if( $0==check_val) { key[$0]++ }
...
9,925
Posted By gopskrish
Hi Thomas, I want to remove duplicates which...
Hi Thomas,

I want to remove duplicates which are specified explicitely rather than all duplicates.
Thanks Thomas.

Hi Anbu,

I am getting the same error message. Can you take up my example...
9,925
Posted By gopskrish
Hi Jim, I have a problem executing the awk...
Hi Jim,

I have a problem executing the awk script which you have recommended.

I am using Korn shell. Do i need to change some thing to accommodate that.
Herewith i am attaching my file
...
9,925
Posted By gopskrish
Hi Vino, Thanks for your prompt response. ...
Hi Vino,

Thanks for your prompt response.

Here i want to pass a string and only duplicate entry of that string should be deleted rather than all duplicates.

In the extract file which we...
9,925
Posted By gopskrish
delete string in a text file leaving the first occurrence
Hi,

How can i delete the second and subsequent occurrence of a particular string from a file ?

eg) test.txt
cattle
bat
battle
mat
matter
cattle
cattle

my output file should be
...
7,140
Posted By gopskrish
Thanks Pressy. It worked. Is it...
Thanks Pressy.

It worked.

Is it possible to assign the target file (in our example target) to some parameter file so that etl jobs can read the file name.

eg)
testparams (Parameter file...
7,140
Posted By gopskrish
append file name contents to a target file
Hi ,

I want to append the contents of many files (not knowing exactly how many files, i will get) in to one target file on a day today basis.
The file names are similar except last value (which...
1,710
Posted By gopskrish
FTP files
Hi,

I am new to unix and I want to ftp files from unix to windows nt machine.
My requirement is like i want to ftp files which are having system date (20050927) in between the filename. Once i...
2,338
Posted By gopskrish
Rahul, Perfect. Thanks a lot for your...
Rahul,


Perfect. Thanks a lot for your valuable inputs.

cheers,
gops
2,338
Posted By gopskrish
Problem while using Sed command
I want to write the output of From_Date_Parm and To_Date_Parm to the target file. I want to write a script by passing the filename.
In my case the file is TransactionParams


I tried it through...
3,707
Posted By gopskrish
Hi Bhargav, Thanx for your prompt reply with...
Hi Bhargav,

Thanx for your prompt reply with code.

I want the second set of statement to be executed if it other than saturday or sunday. If it is saturday or sunday only statement bundled...
3,707
Posted By gopskrish
How can i proceed on this (datecheck)
Hi,


I want to bundle if statements

The script which i created is

if [[ $(date +'%H') -lt 12 ]]; then
if [[ $(date '+%a') = Sat ]]; then
now=`TZ=CST+24 date +%Y-%m-%d`
nows=`TZ=CST+24...
4,152
Posted By gopskrish
Hi , With you people around , I think i can...
Hi ,

With you people around , I think i can go for some complicated scripts.
I am really happy with the way I am getting the replies.

Thanks vgersh99 & Rishi (for correcting me about eq sign...
4,152
Posted By gopskrish
How can i check for a day
Hi,

When i tried this I am getting bad number
if [[ $(date '+%a') -eq Sat ]]; then now=saturday echo $now; else now=notsaturday echo $now; fi

How can i check for the same.

Thanks in advance...
1,913
Posted By gopskrish
Thanks everybody for providing me the solution...
Thanks everybody for providing me the solution in different ways.

cheers,
gops
1,913
Posted By gopskrish
Wonderful Just ice, That was what i expected...
Wonderful Just ice,

That was what i expected and thanks a lot for Providing me the same.

cheers,
gops
1,913
Posted By gopskrish
I want the output within quotes
Hi

I want to store the output of this command within double quotes ?
How can i do that ?

nows=`date +%Y-%m-%e`

The output is 2005-06-24

I want the output as "2005-06-24".
I tried with...
108,760
Posted By gopskrish
Thanks Amit for your input. It is working fine
Thanks Amit for your input. It is working fine
108,760
Posted By gopskrish
I want to get day from the current system date
Hi,

I want to check what day is today (like mon,Tue,wed)
When i checked the syntax, i dont see there is a format specifier for getting the day. Let me know how to get the same.

I am very new...
12,359
Posted By gopskrish
Thanks Jim, I got the info, I asked for. ...
Thanks Jim,

I got the info, I asked for.

Thanks again.

gopskrish
12,359
Posted By gopskrish
How to get sysdate -1
Hi,

How can i change date value to date value - 1 in unix ?

I mean sysdate to sysdate -1.
Can anyone throw some light on that ?

cheers,
gopskrish
9,955
Posted By gopskrish
Hi Muthukumar, Thanks for your prompt reply....
Hi Muthukumar,

Thanks for your prompt reply.

if [[ $(date +'%H') -lt 12 ]]
then

perl -pi -e 's/^From_Date_Parm.*$/From_Date_Parm=sysdate - 1 (2005-06-20)/g' TransactionParams
perl -pi -e...
9,955
Posted By gopskrish
Assign value to a variable in a parameter file
Hi,

I have a parameter file and it contains following items
$ cat TransactionParams
From_Date_Parm=2005-02-25
To_Date_Parm=2005-05-25...
Showing results 1 to 25 of 26

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