- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: HPUX 11.23 system - C program shows LEX using ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 10:18 AM
12-02-2008 10:18 AM
HPUX 11.23 system - C program shows LEX using FILE command
thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 10:27 AM
12-02-2008 10:27 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
The 'file' command makes a best guess attempt to "describe" a file based on the first 512-bytes. If the file in question is source input for the C compiler, it only need be named with a '.c' extension to make the pre-processor/compiler "happy".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2008 03:01 PM
12-02-2008 03:01 PM
Re: HPUX 11.23 system - C program shows LEX using FILE command
Right. I suppose you could add some comments at the top so it doesn't think it is a lex(1) input.
Or fiddle with /etc/magic? Hmm, I don't see anything there, so it must be built into file(1).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 05:05 AM
12-03-2008 05:05 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 05:12 AM
12-03-2008 05:12 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
> thanks..but when you view the file its looks at if its encrypted.!!
Well, then you need to ask your co-worker exactly what (s)he did to the file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 05:13 AM
12-03-2008 05:13 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 07:25 PM
12-03-2008 07:25 PM
Re: HPUX 11.23 system - C program shows LEX using FILE command
Anything you can paste here to give us an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 07:31 PM
12-03-2008 07:31 PM
Re: HPUX 11.23 system - C program shows LEX using FILE command
You could try using vi to open it with a decrypt key of just "Enter" (since usually :X + Enter is the sequence). Barring that, I'd be looking at a restoration from source control or a temp file (anything with name~ in the directory or the co-worker's temp directory?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2008 08:40 PM
12-03-2008 08:40 PM
Re: HPUX 11.23 system - C program shows LEX using FILE command
Why would you ever have problems like that? There is no such command as ":x". :-)
There is either :wq, :q, or ZZ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2008 05:20 AM
12-04-2008 05:20 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
> Dennis: There is no such command as ":x".
I think Don is referring to '-x' at the command line when 'vi' is invoked. This then asks for a "key" and encrypts the file.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2008 06:33 AM
12-04-2008 06:33 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
Maybe I'm a younger fogey than I thought -- but I've been using that keystroke since 1990 or so at least, so I don't think it is a vim or newer vi thing. Works on every version I've ever used, after all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2008 08:25 AM
12-04-2008 08:25 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
> Don: No, I'm really referring to ":x" in command mode
Ah, I see. This *is* documented in the 'vi' manpages in an indirect way under 'zz':
"ZZ Exit the editor, writing out the buffer if it was changed since the last write (same as the ex command x)."
...which then examining the manpages for 'ex' shows that the 'X' (capitalized) is a synonym for crypt'.
Now, if you 'vi' a file and enter ":x" you save your changes and quit (exactly as you said). If, on the other hand you 'vi' and use ":X" (uppercase) you are prompted with:
Are you sure?(y/n)[n]:
...and if you answer in the affirmative, you get:
Entering encrypting mode. Key:
...and if you simply press the return key, no encryption occurs, but of course, if you enter some string, the file will be rewritten as an encrypted one when you write/save the in-memory copy. THen (obviously) to re-edit it you need to do something like:
vi -x file
...and apply the original "key".
Thanks for sharing Don!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2008 10:14 AM
12-04-2008 10:14 AM
Re: HPUX 11.23 system - C program shows LEX using FILE command
may be, the encryption of the file (with no doubts, this file WAS encrypted) is
If not, the user might have entered the same command again, and the result would be a used salt of
:X
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2008 11:38 AM
12-11-2008 11:38 AM