Re: Especial delimiters caracter

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Especial delimiters caracter
Дата
Msg-id 200309241818.37200.dev@archonet.com
обсуждение исходный текст
Ответ на Especial delimiters caracter  ("Montervino, Mariano" <montervi@cabal.com.ar>)
Список pgsql-sql
On Tuesday 23 September 2003 15:56, Montervino, Mariano wrote:
> running the following script
>
> select ('cabal\\' || user_name) into temporary user_access from
> tbl_user_access where access_profile_id = 4;
> copy user_access to '/temp/users.txt' delimiters '|';
>
> The result of the output file is...
> domain\\users
> but the field in the temp table is...
> domain\users
>
> I need the same result like temp table. How could i do it??
> RGDS

$ cat fakedump.txt
C:\\Windows\\system32\\drivers|this\ttabbed\ttext\n
$ perl -p -e 's/\\\\/\\/g;' fakedump.txt
C:\Windows\system32\drivers|this\ttabbed\ttext\n

As you can see, this only handles \\ not \t=tab.
You could also do this in sed:
$ sed -e 's/\\\\/\\/g' fakedump.txt

HTH
--  Richard Huxton Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Useful SQL-statement?
Следующее
От: Tomasz Myrta
Дата:
Сообщение: Re: Useful SQL-statement?