Sorry for not being enough specific : I don't know the content of field2, and it may contain special characters. I'm just sure it does not contain "||", that's why I used it as a delimiter.
Your solution is great, but if I have another pipe in field two :
end of field 2 is missing.
---------- Post updated at 10:49 AM ---------- Previous update was at 10:46 AM ----------
wow
I don't even have time to reply...
Thx radoulov, that was exactly what I was looking for.
Hi All,
Can the cut command have double character delimiter?
If yes, how can we use it.
if my data file contains :
apple || mango || grapes
i used
cut -f1 -d"||" filename
but got an error.
Plz help....
Thanks. (1 Reply)
Hi All
I have to encrypt files and add a suffix ".gpg_<key used>" to it
For example if the file name is test.dat after encryption the file name will be
test.dat.gpg_X005 (here X005 is the key).
I want to decrypt the file later using that key and the original file name.both of them... (7 Replies)
Hi all,
setting a cookie multiple values with delimiter
$value = 'TM=1276245099:LM=1276245099'; // etc etc
setcookie('unix',"$value");
This generates
%3ATM%3D1276245099%3ALM%3D1276245099
I want the data as it is
TM=1276245099:LM=1276245099
Any suggestions? (0 Replies)
Hi all,
Greetings,
I have the following scenario, The contents of main file are like :
Unix|||||forum|||||||||||||||is||||||the||best
so||||||be|||||on||||||||||||||||||||||||||||||||||||||||||||it
And i need the output in the following form:
Unix=forum=is=the=best
so=be=on=it
... (3 Replies)
hi,
i want to PASTE two files, with a delimiter in between, using awk and pipe the output to another file. i am able to achive the reqirement using PASTE command. but it has a limitation of length till 511 bytes.
Example:
-------
File1:
----
sam
micheal
file2:
----
bosco... (11 Replies)
Hi,
I have a file which has many URLs delimited by space. Now i want them to move to separate files each one holding 10 URLs per file.
http://3276.e-printphoto.co.uk/guardian http://abdera.apache.org/ http://abdera.apache.org/docs/api/index.html
I have used the below code to arrange... (6 Replies)
Hi ,
I have a set of files in a folder which i need to cut in to two parts....
Sample files
touch AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch AE_JUNFOR_2014_YTD_2013-05-30-03-30-02.TXT
touch temp_AE_JUNFOR_2014_MTD_2013-05-30-03-30-02.TXT
touch... (4 Replies)
Hi,
Hi,
I have a file with following format
1|" "text " around " |" fire "guest"|" "
2| "xyz"" | "no guest"|"3"
3| """ test3""| "one" guest"|"4"
My requirement is to replace all occurrences of " to ' which are occurring between |" "|delimiter
so my output should look like this
1|"... (3 Replies)
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)