Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
have heard a lot about SED and downloaded and installed GNU SED for my Windows XP. 1) The install program installed it c:\program files. 2) I have a file in directory C:\lewisC\bm_pg0001.txt. The file has text, 1.pdf in it. 3) I want to change 1.pdf to bm_pg0001.pdf
4) after messing around to invoke SED with paths etc. I copied all the files in sed bin folder to C:\lewisC\ used command here for DOS prompt and finally able to invoke SED.
Now can somebody help with the sed command to change 1.pdf to bm_pg0001.pdf in the file bm_pg0001.txt. Thanks- I now realize why Windows was a success. Thanks
Like this:
sed "s/1\.pdf/bm_pg0001.pdf/g" < input_file > output_file
Enjoy!
Yes, it seems Windows is a better platform for those unwilling to do even the most basic research. Take a look at http://www.grymoire.com/Unix/Sed.html.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am using the Fish shell (version 3.3.1) on MacOS. Every time I run a command it shows this error multiple times:
error: Unable to open universal variable file '/': Permission denied
The commands still run perfectly, but it's very annoying to see these errors. They are still on the screen even after a clear command.
Fish has a feature where it'll store so called "universal" variables to a file on disk, so they can easily be persisted and shared among open fishes.
This error:
error: Unable to open universal variable file '/': Permission denied
Shows that fish is trying to open the file at "/", the root of the filesystem. This points to a misconfiguration, because "/" isn't a file, by definition. It's a directory.
The file is supposed to be in the config directory, which is at:
$XDG_CONFIG_HOME/fish, if that variable is set
$HOME/.config/fish, if it isn't
I can't find the specific sequence to reproduce this, but it appears that $XDG_CONFIG_HOME or $HOME are set when fish is started (by its parent process, probably the terminal), and to non-functional values.
Was having this same issue after installing using brew install fish.
What finally worked was uninstalling fish.
brew uninstall fish
Then removing fish from my .config folder.
cd ~
rm -rf .config/fish
Then I just installed fish using the fish GUI installer.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Trying out Windows 10 for first time. Installed winget onto my powershell, and then used winget to install vscode: winget install vscode. When I install vscode on a Mac/Linux, I get a command-line tool code that I like to use to launch vscode from my PWD: code -n .
But being new to Powershell and winget, I have no idea how to determine exactly what/where/how things got installed. In summary:
Is there a command-line tool like code installed by winget?
If not, how else might I launch vscode with a window on my PWD?
OK, after rebooting code -n . works as expected.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How do I install perl module XML::LibXML on windows?
thanks
If you are using ActiveState Perl , try this command on windows command prompt:
ppm install XML::LibXML
If you have installed Perl with strawberry, open a cmd, then :
cpan XML::LibXML
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Goal: Under OSX, From the command line, open a file in eclipse.
Environment:
OSX 10.7
Eclipse Indigo Java EE bundle (3.7.1)
Expectation:
cd to directory eclipse is installed from.
run:
./eclipse --launcher.openFile notice.html
Eclipse opens with the file 'notice.html' open/editable
What happens:
Eclipse opens but the file isn't loaded. :(
I explicitly want to do this from the command line, I'm NOT interested in opening the file via Finder->Open With->Choose Eclipse.app
Here is an article that seems to indicate that I should be able to do this:
http://aniefer.blogspot.com/2010/05/opening-files-in-eclipse-from-command.html
If there is another way to communicate with an already open eclipse to open a file that would be acceptable as well.
Eventually I'd like to use:
open //path-to-Eclipse.app --args --launcher.openFile //path-to-file
...to communicate my desire for the file to open in the current instance of the running eclipse.
But for now I'm just trying to see if there is ANY way to open a file
Anyone have any ideas?
Thanks in advance for any help/pointers :)
I agree with Bavarious. I always use open -a to open a specific file in a GUI app from the command line.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
When you double click on a file opens a new window emacs. Tell me how to do to open in the same
I beg your pardon, Linux OS
I installed emacs23
Then i run the command:
emacs --daemon &&
emacsclien -c &&
emacsclien -c
And i have opened 2 windows instead of one
You don't provide enough information, such as what OS/windowing system you're using, but the answer involves using emacsclient. The wiki page has all the details of using emacsclient, though not how to set up your OS/windowing system to associate the file types with emacsclient (instead of emacs).
You have a single Emacs instance with two windows. You have two windows because you explicitly asked for them by passing the -c option to emacsclient.