Properly feed paths to executables in bash script
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Hello all I have a text file (1.txt) that contains full paths to binaries which I need to execute a command (val_bin) for each path in the file.
1.txt Example:
/source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin
/source/ed/dev/ed/ab/ed_lap/comercial/bin/APP2.bin
/source/ed/dev/ed/ab/ky_len/Industrial/bin/APP3.bin
...
Command Example: val_bin- Creates an html file for every record in 1.txt
e.g.
val_bin -output <DESTINATION.html> -path </source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin>
where -output should have the path where the html files will be created after each time the command ends ("DESTINATION").
where -output should specify name.bin.html (e.g. App1.bin.html)
where -path needs to be the entire path fed into the command
example output: (where /tmp is the destination of the html files)
> ll /tmp
/tmp/APP1.bin.html
/tmp/APP2.bin.html
/tmp/APP3.bin.html
...
Ive tried several different loop options but now am investigating pure awk. I am sure I am doing soemthing stupid! Thanks in advance!
bash awk path for
add a comment |Â
up vote
0
down vote
favorite
Hello all I have a text file (1.txt) that contains full paths to binaries which I need to execute a command (val_bin) for each path in the file.
1.txt Example:
/source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin
/source/ed/dev/ed/ab/ed_lap/comercial/bin/APP2.bin
/source/ed/dev/ed/ab/ky_len/Industrial/bin/APP3.bin
...
Command Example: val_bin- Creates an html file for every record in 1.txt
e.g.
val_bin -output <DESTINATION.html> -path </source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin>
where -output should have the path where the html files will be created after each time the command ends ("DESTINATION").
where -output should specify name.bin.html (e.g. App1.bin.html)
where -path needs to be the entire path fed into the command
example output: (where /tmp is the destination of the html files)
> ll /tmp
/tmp/APP1.bin.html
/tmp/APP2.bin.html
/tmp/APP3.bin.html
...
Ive tried several different loop options but now am investigating pure awk. I am sure I am doing soemthing stupid! Thanks in advance!
bash awk path for
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Hello all I have a text file (1.txt) that contains full paths to binaries which I need to execute a command (val_bin) for each path in the file.
1.txt Example:
/source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin
/source/ed/dev/ed/ab/ed_lap/comercial/bin/APP2.bin
/source/ed/dev/ed/ab/ky_len/Industrial/bin/APP3.bin
...
Command Example: val_bin- Creates an html file for every record in 1.txt
e.g.
val_bin -output <DESTINATION.html> -path </source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin>
where -output should have the path where the html files will be created after each time the command ends ("DESTINATION").
where -output should specify name.bin.html (e.g. App1.bin.html)
where -path needs to be the entire path fed into the command
example output: (where /tmp is the destination of the html files)
> ll /tmp
/tmp/APP1.bin.html
/tmp/APP2.bin.html
/tmp/APP3.bin.html
...
Ive tried several different loop options but now am investigating pure awk. I am sure I am doing soemthing stupid! Thanks in advance!
bash awk path for
Hello all I have a text file (1.txt) that contains full paths to binaries which I need to execute a command (val_bin) for each path in the file.
1.txt Example:
/source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin
/source/ed/dev/ed/ab/ed_lap/comercial/bin/APP2.bin
/source/ed/dev/ed/ab/ky_len/Industrial/bin/APP3.bin
...
Command Example: val_bin- Creates an html file for every record in 1.txt
e.g.
val_bin -output <DESTINATION.html> -path </source/ed/dev/ed/ab/ed_len/comercial/bin/APP1.bin>
where -output should have the path where the html files will be created after each time the command ends ("DESTINATION").
where -output should specify name.bin.html (e.g. App1.bin.html)
where -path needs to be the entire path fed into the command
example output: (where /tmp is the destination of the html files)
> ll /tmp
/tmp/APP1.bin.html
/tmp/APP2.bin.html
/tmp/APP3.bin.html
...
Ive tried several different loop options but now am investigating pure awk. I am sure I am doing soemthing stupid! Thanks in advance!
bash awk path for
bash awk path for
asked 9 mins ago
SSDdude
786
786
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago
add a comment |Â
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475665%2fproperly-feed-paths-to-executables-in-bash-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What is your actual problem here... the output file name ?
â don_crissti
4 mins ago