Search Results

Search: Posts Made By: varunrbs
2,732
Posted By varunrbs
Not woking :-(
I am afraid this solution is not working. Also I can see that the command is using the hardcode values (XML). This will not be the case with the records; any value can come at any place.

I need a...
2,732
Posted By varunrbs
1 record in single line without any newline character
Sorry for my earlier message. In Unix File 1 record is in 1 line only. There is no newline character in the single record. However while displaying it takes 3 lines.

Also the above solution seems...
2,732
Posted By varunrbs
1 record in 3 lines
One single record is taking 3 lines. All the records are starting with TSCM. There are 10 records in total.
2,732
Posted By varunrbs
Change in Input feed based on condition file
Sorry Guys for not being able to explain in one of my earlier post.

I am now putting my requirement with the input file and desired output file.


In the below input file -

Transaction...
2,042
Posted By varunrbs
Your understanding is totally corect
Yes. This is exactly what is required.

Also there are around 1 million records in the file and the command/script should check all records.

And there are 15 similar conditions.
2,042
Posted By varunrbs
detailed explanation
I hope the below explanation will make the things clears. As the single record in file is having 955 characters, file is too big to be posted even for sample record.


Input file Details
...
2,042
Posted By varunrbs
Change file content based on data
I have a Transaction File coming into the system. In this file, in all records the relevant data is as follows-

Position 1:10 -> Transaction Code
Position 252:255 -> 4 digit...
6,607
Posted By varunrbs
Thanks
Thanks a lot for this. The solution working perfectly.
6,607
Posted By varunrbs
Thanks , almost there , fianl clarification
Thanks a lot , I am almost there with this command-

awk '! match($0,/'"$var1"'|'"$var2"'|'"$var3"'/) {s=substr($0,20,length-19); $0="2010-04-29-00.00.00"s}1' urfile

However value of...
6,607
Posted By varunrbs
Thanks , further clarification required
Thanks for your replies. The awk command is working as standalone.

However my 3 valid dates are available in 3 variables-

var1=2010-04-29-00.00.00
var2=2010-04-28-00.00.00...
6,607
Posted By varunrbs
File ouput and problem further explained
The file looks like this-

2010-04-29-00.00.00TSCN00000171585 * ** ADDR
2010-04-27-00.00.00TSCN00000171585 * ** ADDR...
6,607
Posted By varunrbs
Replace Date field in Unix File
I have a data file having first 19 characters having the date in the below format-

2010-04-29-00.00.00

I have to check this date field ( first 19 characters) against some specific dates and...
6,204
Posted By varunrbs
Required entries
The relevent entries from the files are-

/etc/passwd


oracle:x:100:200::/opt/oracle:/usr/bin/ksh
norkadm:x:1209:502:Norkom Admin:/home/norkadm:/usr/bin/ksh


/etc/group

...
6,204
Posted By varunrbs
Unix Permissions
We have a user group ‘norkgrp’ which is having 2 users ‘norkadm’ and ‘oracle’.

Further we have a directory ‘fstf_blobs’ where ‘norkadm’ is the owner and ‘norkgrp’ is the group owner. The...
2,541
Posted By varunrbs
tuning in final function
This is my final function. For 2000 records running in 3 minutes. Can this be tuned . Many Thanks in advance.


modify_customer_feed()
{
while IFS='' read line
do
f1="$(echo "$line" | cut...
2,541
Posted By varunrbs
Tuning function
This is my function in UNIX file. In this function I am

-> first replacing spaces in character 19-27 with 0
-> then if it's all zeros ( 9 zeros) replace it with space

The reason I have to...
4,205
Posted By varunrbs
Thanks
This worked perfectly. Thanks a lot.
4,205
Posted By varunrbs
not working :-(
while read line
do
f1="$(echo "$line" | cut -c1-18)"
f2="$(echo "$line" | cut -c19-27)"
f3="$(echo "$line" | cut -c28-854)"

f2=$(echo "$f2"|sed 's/ /0/g')

printf "%s%s%s\n" "$f1" "$f2"...
4,205
Posted By varunrbs
printf problem
In one of the scripts I am using pintf function as following

printf "%s%s%s\n" "$f1" "$f2" "$f3"

f3 variable contains a string of 10 characters. However it has value first 7 character and...
2,032
Posted By varunrbs
conditional replacement
I can use sed for replacing , but the thing is that I have to check the values first , and only when condition is satisfied I need to replace it with my values.

Could you please suggest something...
2,586
Posted By varunrbs
Thanks this worked perfectly.
Thanks this worked perfectly.
2,032
Posted By varunrbs
Replace file content after checking value
Our system is receiving one feed from the third party.

One of the field in the flat file is ID which id from position 19 to 27. In some cases this ID is coming as 9 zeros (000000000) or 1 right...
2,586
Posted By varunrbs
need the entire record
I want the new file to have the entire record ( all 288 characters) of unique account ids.

If account id 00001 is having 5 recordsI want 1 whole record of this account id.
2,586
Posted By varunrbs
Unique account id file
I have a fixed length file (each record of 288 characters).

The unique id in each record is account_id which is from position 1:30

My file is having duplicate account ids ( records having...
3,225
Posted By varunrbs
minor twek in requirement
As per requirement I don't want even the start and end tag. It shlould also be replaced with equivalent spaces.

Input File

6572537265325476234START1928 oakland END734678634895634895

Output...
Showing results 1 to 25 of 31

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