Hello All,
I need to convert a csv file to pipeline delimiter file in UNIX. The data in file itself contains comma with double qouted qualifier apart from the comma separator. Let me know how to do it.
Hi,
I used to count number of fields using following command
HTML Code:
head -1 <filename> | awk -F"," '{print NF}'
Now the scenario is the delimiter(comma) occurs inside one of the data field. How to ignore the comma inside data and consider only delimiter and count number of fields.
Hi,
I am trying to load data from a file to oracle DB. The file am using has a ";" as a delimiter. While I load the file, I want to check whether the file is having the correct delimiter or not. if not, the file should not be processed. Is there any way that i could handle this scenario using shell Script. Can anyone please help me.
Thanks in advance..
I have a log file which on field $11 there is sth like: /A/B/C and I want to extract the last part which is C.
for space delimiter I used:
Code:
awk '{print $2 " " $5 ";" $7 ";" $9 ";" $11}'
and had no problem.
but dont know how to extract the 3rd part of the slash delimiter.
That would be great if someone can help me in an easy way as I am just a be
hi all,
i have a string with a number of "/"s as delimiter.
and i want everything BEFORE the last delimiter
i know to use basename to get everything after the last delimiter.
thx a lot!
Hi,
I am new to shell scripting and unix in general, and I am running into a problem.
I need to grep my script for a line which is a delimiter for an encoded file. I would like to get the line number of this delimiter so that i can use "tail" to get the encoded data and decode it.
I've a series of words in the format "abc0001d" till "abc1999d".
I would like to use delimiter to cut the word from abc0001s to two words:
abc00 and 01d. Help me in finding the correct delimiter to cut in desired way.
Hi,
I'm new to unix, i have a variable length file like below,
Code:
01|Test|Test1|Sample|
02|AA|BB|CC|DD|
03|AAA|BBB|CCC|DDD|EEE|RRR|TTT|SSS|YYY|
I need to make this as a fixed length file. Assume that i have 10 columns in the DAT file.
for ex: the first 01 record is having 4cols - there i need to add six "|" delimiter and for 02 record need to add five delimiters.
Hi all,
I want to get a substring from a string based on given delimiter, for example:
Code:
str="foo|bar|baz"
with delimiter "|",
I want to get one substring at each time with the order number the substring in the whole string,
given 1 to get "foo",
given 2 to get "bar",
given 3 to get "baz",
I guess it could be done with sed and an regula