Search Results

Search: Posts Made By: baskivs
28,620
Posted By baskivs
how to print the column that contains a string in delimited file in unix
Hi Team,

I have a requirement to print the column or find the column number of a particular string in delimited (;) file.

Ex:

aaa;bbb;ccc;rrr;mmm;
gggg;rrr;mmmm;ssss;eee;aaa;...
5,317
Posted By baskivs
No Dude Your scruipt will create new file...
No Dude
Your scruipt will create new file "outfile" . but i should not create another file.. with in the existing file i need to append in first line
Example :

if my Header values is,
...
5,317
Posted By baskivs
adding header in a file
Hi team,

In my script i am storing some value in a variable "header".

I want to add the header value has header in a file.

Please help me on this

Thanks in advance,

Baski
14,300
Posted By baskivs
finding duplicates in csv based on key columns
Hi team,

I have 20 columns csv files. i want to find the duplicates in that file based on the column1 column10 column4 column6 coulnn8 coulunm2 . if those columns have same values . then it...
5,466
Posted By baskivs
DB2 Connect issue
Hi

i m trying to connect DB2 via unix. it is successfully connect. but the connect is getting disconnect .

below is the query ,

countvalue=$(db2 "connect to <Database> user <username> ...
3,985
Posted By baskivs
THanks, But how it will append the cut...
THanks,


But how it will append the cut command ouput as a last column in respective file,

for example,
when i do 'ls -1' . i will get the below,


Code: ls -1
aaa_import.csv...
3,985
Posted By baskivs
Append a new column in a file
Hi all,

I need to append 'ls --' command output as a new column in a existing file.

for example,
when i do ls -- i will get the below,

aaa_import.csv
bbb_import.csv
ccc_import.csv...
1,828
Posted By baskivs
Removing non matching records
Hi all

I have a file with records starting with "Page" has a first column.

some of the records have some other junk characters has first column.

so pls help me to remove rows which is not...
7,297
Posted By baskivs
Removing first and last character of line
Hi all,

Please help me to remove first and last character of each line in a file.


Thanks,
Baski
2,339
Posted By baskivs
Thanks a lot frnds..... yes Carlom , it it...
Thanks a lot frnds.....

yes Carlom , it it should be preserved with quote...like 10,000 not 10 and 000

but sed is not reading multiple files at time

mean,

$ sed 's,\",,g'...
2,339
Posted By baskivs
multiple delimeters in awk
Hi all,


The have 92 columns with combination of "" and , two delimiters‎ and i need to takes some 32 columns only in that. i used awk command to extract .but its not working good.

Example:...
1,013
Posted By baskivs
URL download checking
Hi all,

I have a url and i am using wget to load files from the url.
but i requirement is if need to validate whether that downloading process done properly not.

if that has any expcetion i...
2,255
Posted By baskivs
thanks ahamed, above is working fine.. and...
thanks ahamed,

above is working fine.. and also i need to sort the file w.r.t column $8


Thanks,
BAski
2,255
Posted By baskivs
Thanks a lot ahamed, and i need to sorting...
Thanks a lot ahamed,

and i need to sorting the outputfile w.r.t to $8

Regards,
Baski
2,255
Posted By baskivs
Thanks for all your replies, i m just...
Thanks for all your replies,

i m just expanding my query,

i can able to delete and append by using the below comman,

awk 'FNR>1{print}' *.csv >> out_file

and i aslo need some...
2,255
Posted By baskivs
Remove head for all the files
Hi all,

i need to remove the header for all the files which is ending with .csv and append into one file

example,
test1.csv
test2.csv
test3.csv

i tried with the below command,
sed...
4,351
Posted By baskivs
Hi frnds, Please help me out on the above...
Hi frnds,

Please help me out on the above issue..

thanks,
baski
4,351
Posted By baskivs
Hi, it has contain 51 colums.. with same...
Hi,

it has contain 51 colums.. with same order only..

actually i have 2 xml file and i m converting those xml files into csv. to compare those files.

it contains large data so i unable to...
4,351
Posted By baskivs
CSV file comparison
Hi all,

i have two .csv files. i need to compare those two files and if there is any difference that should be moved into third .csv file.

example,

org.csv and dup.csv


when we compare...
2,058
Posted By baskivs
Thanks a lot Kurmar.. I hope it will...
Thanks a lot Kurmar..

I hope it will work..let me check..

Baski
2,058
Posted By baskivs
cut & AWK
HI all,

i have the source file like below,

05 BL-FEE-CYC-CDE PIC S9(03) COMP-3.
05 BL-FEE-ERR-MSG PIC X(00030)....
1,860
Posted By baskivs
Thanks Bartus, but its not working , gsub is...
Thanks Bartus,

but its not working , gsub is not supporting here,


Baski
1,860
Posted By baskivs
Find and replace a character
Hi Team,

i have 1st cloumn of data containing,

LAMSBA01-BA-COFF-YTD
LAMSBA01-BA-COFF-ITD
LAMSBA01-BA-AGGR-IND .
LAMSBA01-BA-CURR-COFF-BAL

i need to...
1,650
Posted By baskivs
Hi Team, Atleast can someone help me on...
Hi Team,

Atleast can someone help me on writing a Awk in shell script with this format,

if(substr($2,1,1)=="S"||substr($2,1,1)=="9")
{

if(index($2,"V")>0)
{
...
1,650
Posted By baskivs
AWK script
Hi Team,

I have the below AWKscript ,

awk '{printf "%s\t ", $1;if(substr($2,1,1)=="X"){ if(substr($2,2,1)=="("){printf "VARCHAR\t%d\n",int(substr($2,3,length($2)-4))} else...
Showing results 1 to 25 of 27

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