• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3207
  • Last Modified:

Sybase isql

Hi everyone,

I have a little issue with using Sybase isql output file.

Everything works as described in isql reference except one thing. It adds one space character for each output line.

Can any one suggest how to remove it?

It is like _12345 instead of just 12345 (_ represent a space character here)

Thanks.
0
GoodName
Asked:
GoodName
1 Solution
 
vikram4oCommented:
It is the normal behavior of isql to append space at the beginning of the output line
$ isql S<Server name>
Password:
1> select "isql" isql
2> go
 isql
 ----
 isql

(1 row affected)

From my understanding, space is default column separator that gets added to the beginning of each output line.

You can remove it by two methods,
First:
isql S<Server name> -s
Password:
1> select "isql" isql
2> go
isql
----
isql

(1 row affected)

Second:
Get the isql output file and delete the leading whitespace from the file using sed operator.
sed 's/^[ \t]*//' file_name >> desired_output_file

I would suggest the second method as the first method would remove the column separator.
0
 
GoodNameAuthor Commented:
Thanks a lot! It was very timely.

Kind regards.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now