File /Applications/Xcode.app/Contents/MacOS/Xcode not working

Using Xcode 10.1, Mojave 10.14.1

Page 26 of the book says to use “file /Applications/Xcode.app/Contents/MacOS/Xcode”
but it returns a error:
error: unable to find executable for ‘/Applications/Xcode.app/Contents/MacOS/Xcode’

using "ps -ef pgrep -x Xcode " to find Xcode path returns error:
error: error: use of undeclared identifier ‘pgrep’
error: use of undeclared identifier ‘x’

Help appreciated
Thanks
Bill

@lolgrep Can you please help with this when you get a chance? Thank you - much appreciated! :]

You might have installed Xcode in a different path. Make sure Xcode is installed then launch it.

Make sure to use the backticks in the command after Xcode is installed

 ps -ef `pgrep -x Xcode`

Xcode 10.1 is installed and running. It is installed in the default location “Applications”

Here is screen shot from terminal:
QUOTE
Last login: Sun Nov 4 13:08:49 on ttys001
Williams-Mac-mini:~ williamlynn$ lldb
(lldb) ps -ef pgrep -x Xcode
error: error: use of undeclared identifier ‘pgrep’
error: use of undeclared identifier ‘x’

(lldb)
UNQUOTE

Any other suggestions

Thanks

Bill

Is there a solution yet???

This topic was automatically closed after 166 days. New replies are no longer allowed.