Bash script "no such file or directory"
1
0
Entering edit mode
2.3 years ago
samc • 0

I am trying to run a bash script using the sed replace command, and it keeps outputting that there is "No such file or directory" for every command.

I have set data path as current directory: DATA_PATH= "."

And still the script is not outputting the files. When I try to run a single command outside of the script however, it does work!

Anyone have any insight?

Line Command Script Bash • 1.5k views
ADD COMMENT
0
Entering edit mode

I am trying to run a bash script using the sed replace command

show us the content of this script and how it was invoked.

I have set data path as current directory: DATA_PATH= "."

nobody knows what is DATA_PATH unless we see the content of the script.

ADD REPLY
0
Entering edit mode

This is how the script was initiated:

> #!/bin/bash

>$DATA_PATH="."

> $sed '1 s/A/G/' input.file > output.file
ADD REPLY
0
Entering edit mode
2.3 years ago

remove those '$' a the beginning of the lines....

ADD COMMENT
0
Entering edit mode

Wow, thank you I am very new to command line and writing bash scripts!!!

ADD REPLY

Login before adding your answer.

Traffic: 2365 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6