Not able read data with cat command

I am trying to read some data form .key file with cat command..but its not displaying data correctly..tried with other commands also still no use.i tried with CAT with SED combination but no use..

Please help me with the command or script.

There is a cat command and there is a sed command. UNIX, Linux, and similar systems have utility names that are case sensitive. The cat utility cannot be invoked using the name CAT and the sed utility cannot be invoked using the name SED .

Making us guess at what you might have typed and now showing us the exact error message produced by your shell when you tried to get a command to work makes it impossible for us to give you any reasonable advice.

Tell us what operating system you're using.

Tell us what shell you're using.

Show us the exact name of your .key file and show us its contents.

Show us the exact command you tried to use to read data from that file.

Tell us what you expected to happen when you issued that command and show us the exact output that was produced when you issued that command.

Without all of the above requested basic information, we have little chance of making suggestions that will really help you do whatever it is that you are trying to do. Please help us help you.

1 Like

Thanks for the reply..

I can read other files data that is not a problem.but i have only problem with this .key file..
its deplaning as below.only little data where i supposed to get more data..

6.30.000.001|???????

it is Solaris and i am running command threw web shell.here i can not run VI or other editing tools..i have to get the data in file with cat command or any other.

below is the command

cat /data/security/get.key

and output as below..

6.30.000.001|???????

i supposed to get the key values,which i am not getting

Please use code tags as required by forum rules!

It would be helpful if we knew WHAT you're after. Obviously it's not 6.30.000.001|??????? . If the file has more than one line, do you want all of them, or are there any rules to select certain lines.

i want to read all data in file.which i am not getting with this command..i tried lot of options but i still have issue..

WHAT is "all data"? cat WILL yield the entire file!

if i cat to folder name it will get download..
if i ct to file it will display data in browser..but .key data i am not able to get..

is there any other command to get the file downloaded in the browser..

see the below

command is executed from browser as below:

;EXECUTE_CMD;CMDLINE=cat /data/security/get.key

Can it be that it is a binary file? What does

strings /data/security/get.key

give?

1 Like

thanks for that..but this is not working for me either..do you know how to download the .key file with command

Could those question marks be non ASCII characters?

The cat command is outputting a file's content whatever the file content. There is zero processing.

If the file isn't received properly, the issue is elsewhere. The file itself might be corrupted in the first place, the way you wrap cat with something else, possibly SAP, is breaking it, the way you read it or use it is not suited for the file content.

There is no way to help you until you explain with precise details what you mean with "it doesn't work".