Find command not working in shell script
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a to find for list of words in a list of files. Hence I have put the list of words in a file, and using for
loop trying to read each word in a file and use find command to grep
for that word in list of found files.
I am using the mentioned flavor of Linux
bash-3.1$ uname
HP-UX
And below mentioned is my shell script.
#!/bin/sh
PATH="/NO/20171013"
STRING=`/usr/bin/cat /home/test/STAT44_test.txt`
for LINE in $STRING
do
echo "find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l"
LINES=`find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l`
echo "LINES count is $LINES"
if [ $LINES -eq 0 ]
then
echo "In not found"
# echo "$LINE is not found in $PATH" >> /home/test/STAT44_not_found.out
else
echo "In Found"
# echo "$LINE is found in $PATH" >> /home/test/STAT44_found.out
fi
done
The find command find $PATH -type f -name "*.txt" -exec grep -w '$LINE' ; 2>/dev/null
works perfectly in the command prompt, whereas it is not at giving any output, if used in the shell script as mentioned above.
The output of echo $?
is 0 but the find command doesn't produce any output.
The output of the script is
find /NO/20171013 -type f -name "*.txt" -exec grep -w 655044810645 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
find /NO/20171013 -type f -name "*.txt" -exec grep -w 734729751028 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
Actually the *.txt
files under /NO/20171013
has files with pattern 655044810645
and 734729751028
. Hence the Word count
should not be 0 and it has to get into else
part.
What could be missing?
shell-script grep find hp-ux
add a comment |Â
up vote
0
down vote
favorite
I have a to find for list of words in a list of files. Hence I have put the list of words in a file, and using for
loop trying to read each word in a file and use find command to grep
for that word in list of found files.
I am using the mentioned flavor of Linux
bash-3.1$ uname
HP-UX
And below mentioned is my shell script.
#!/bin/sh
PATH="/NO/20171013"
STRING=`/usr/bin/cat /home/test/STAT44_test.txt`
for LINE in $STRING
do
echo "find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l"
LINES=`find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l`
echo "LINES count is $LINES"
if [ $LINES -eq 0 ]
then
echo "In not found"
# echo "$LINE is not found in $PATH" >> /home/test/STAT44_not_found.out
else
echo "In Found"
# echo "$LINE is found in $PATH" >> /home/test/STAT44_found.out
fi
done
The find command find $PATH -type f -name "*.txt" -exec grep -w '$LINE' ; 2>/dev/null
works perfectly in the command prompt, whereas it is not at giving any output, if used in the shell script as mentioned above.
The output of echo $?
is 0 but the find command doesn't produce any output.
The output of the script is
find /NO/20171013 -type f -name "*.txt" -exec grep -w 655044810645 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
find /NO/20171013 -type f -name "*.txt" -exec grep -w 734729751028 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
Actually the *.txt
files under /NO/20171013
has files with pattern 655044810645
and 734729751028
. Hence the Word count
should not be 0 and it has to get into else
part.
What could be missing?
shell-script grep find hp-ux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a to find for list of words in a list of files. Hence I have put the list of words in a file, and using for
loop trying to read each word in a file and use find command to grep
for that word in list of found files.
I am using the mentioned flavor of Linux
bash-3.1$ uname
HP-UX
And below mentioned is my shell script.
#!/bin/sh
PATH="/NO/20171013"
STRING=`/usr/bin/cat /home/test/STAT44_test.txt`
for LINE in $STRING
do
echo "find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l"
LINES=`find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l`
echo "LINES count is $LINES"
if [ $LINES -eq 0 ]
then
echo "In not found"
# echo "$LINE is not found in $PATH" >> /home/test/STAT44_not_found.out
else
echo "In Found"
# echo "$LINE is found in $PATH" >> /home/test/STAT44_found.out
fi
done
The find command find $PATH -type f -name "*.txt" -exec grep -w '$LINE' ; 2>/dev/null
works perfectly in the command prompt, whereas it is not at giving any output, if used in the shell script as mentioned above.
The output of echo $?
is 0 but the find command doesn't produce any output.
The output of the script is
find /NO/20171013 -type f -name "*.txt" -exec grep -w 655044810645 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
find /NO/20171013 -type f -name "*.txt" -exec grep -w 734729751028 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
Actually the *.txt
files under /NO/20171013
has files with pattern 655044810645
and 734729751028
. Hence the Word count
should not be 0 and it has to get into else
part.
What could be missing?
shell-script grep find hp-ux
I have a to find for list of words in a list of files. Hence I have put the list of words in a file, and using for
loop trying to read each word in a file and use find command to grep
for that word in list of found files.
I am using the mentioned flavor of Linux
bash-3.1$ uname
HP-UX
And below mentioned is my shell script.
#!/bin/sh
PATH="/NO/20171013"
STRING=`/usr/bin/cat /home/test/STAT44_test.txt`
for LINE in $STRING
do
echo "find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l"
LINES=`find $PATH -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | /usr/bin/wc -l`
echo "LINES count is $LINES"
if [ $LINES -eq 0 ]
then
echo "In not found"
# echo "$LINE is not found in $PATH" >> /home/test/STAT44_not_found.out
else
echo "In Found"
# echo "$LINE is found in $PATH" >> /home/test/STAT44_found.out
fi
done
The find command find $PATH -type f -name "*.txt" -exec grep -w '$LINE' ; 2>/dev/null
works perfectly in the command prompt, whereas it is not at giving any output, if used in the shell script as mentioned above.
The output of echo $?
is 0 but the find command doesn't produce any output.
The output of the script is
find /NO/20171013 -type f -name "*.txt" -exec grep -w 655044810645 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
find /NO/20171013 -type f -name "*.txt" -exec grep -w 734729751028 ; 2>/dev/null | /usr/bin/wc -l
LINES count is 0
In not found
Actually the *.txt
files under /NO/20171013
has files with pattern 655044810645
and 734729751028
. Hence the Word count
should not be 0 and it has to get into else
part.
What could be missing?
shell-script grep find hp-ux
edited Oct 16 '17 at 12:18
asked Oct 16 '17 at 8:38
sabarish jackson
119112
119112
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
First, set up a proper $PATH
(and see answer by Kamil Maciorowski):
Logg in with suitable user (root?) and execute:
echo PATH=$PATH
Add the output in the start of your script
OR you can add a full path to find
command. If you don't know where find
are placed, execute:
which find
Output will be like this: /usr/bin/find
And you have a mistake inside loop:
You need to replace single quotes with doublequotes (around of $LINE
), otherwise the variable will not be interpreted:
echo "find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l"
LINES=`find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l`
Some notes:
- You do not need
cat file
, try to use loop instead. But use onlywhile
, notfor
! Read Why you don't read lines with "for" and How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. Butfind
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.
â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
 |Â
show 1 more comment
up vote
4
down vote
$PATH
is important variable with meaning. You should choose another name.
In this case find
executable cannot be found because $PATH
doesn't lead to it. You are not notified because of 2>/dev/null
.
echo
is probably a shell builtin, it needs no $PATH
to work. The same for for
etc.
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output./NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. Withcat
they make the content ofSTAT44.txt
be assigned to the variable.
â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
First, set up a proper $PATH
(and see answer by Kamil Maciorowski):
Logg in with suitable user (root?) and execute:
echo PATH=$PATH
Add the output in the start of your script
OR you can add a full path to find
command. If you don't know where find
are placed, execute:
which find
Output will be like this: /usr/bin/find
And you have a mistake inside loop:
You need to replace single quotes with doublequotes (around of $LINE
), otherwise the variable will not be interpreted:
echo "find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l"
LINES=`find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l`
Some notes:
- You do not need
cat file
, try to use loop instead. But use onlywhile
, notfor
! Read Why you don't read lines with "for" and How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. Butfind
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.
â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
 |Â
show 1 more comment
up vote
2
down vote
accepted
First, set up a proper $PATH
(and see answer by Kamil Maciorowski):
Logg in with suitable user (root?) and execute:
echo PATH=$PATH
Add the output in the start of your script
OR you can add a full path to find
command. If you don't know where find
are placed, execute:
which find
Output will be like this: /usr/bin/find
And you have a mistake inside loop:
You need to replace single quotes with doublequotes (around of $LINE
), otherwise the variable will not be interpreted:
echo "find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l"
LINES=`find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l`
Some notes:
- You do not need
cat file
, try to use loop instead. But use onlywhile
, notfor
! Read Why you don't read lines with "for" and How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. Butfind
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.
â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
 |Â
show 1 more comment
up vote
2
down vote
accepted
up vote
2
down vote
accepted
First, set up a proper $PATH
(and see answer by Kamil Maciorowski):
Logg in with suitable user (root?) and execute:
echo PATH=$PATH
Add the output in the start of your script
OR you can add a full path to find
command. If you don't know where find
are placed, execute:
which find
Output will be like this: /usr/bin/find
And you have a mistake inside loop:
You need to replace single quotes with doublequotes (around of $LINE
), otherwise the variable will not be interpreted:
echo "find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l"
LINES=`find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l`
Some notes:
- You do not need
cat file
, try to use loop instead. But use onlywhile
, notfor
! Read Why you don't read lines with "for" and How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
First, set up a proper $PATH
(and see answer by Kamil Maciorowski):
Logg in with suitable user (root?) and execute:
echo PATH=$PATH
Add the output in the start of your script
OR you can add a full path to find
command. If you don't know where find
are placed, execute:
which find
Output will be like this: /usr/bin/find
And you have a mistake inside loop:
You need to replace single quotes with doublequotes (around of $LINE
), otherwise the variable will not be interpreted:
echo "find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l"
LINES=`find $PATHS -type f -name "*.txt" -exec grep -w "$LINE" ; 2>/dev/null | wc -l`
Some notes:
- You do not need
cat file
, try to use loop instead. But use onlywhile
, notfor
! Read Why you don't read lines with "for" and How can I read a file (data stream, variable) line-by-line (and/or field-by-field)?
edited Oct 16 '17 at 10:39
answered Oct 16 '17 at 9:26
Egor Vasilyev
1,792129
1,792129
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. Butfind
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.
â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
 |Â
show 1 more comment
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. Butfind
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.
â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
+1 Because you cover issues my answer doesn't (I decided not to duplicate them).
â Kamil Maciorowski
Oct 16 '17 at 11:09
@Egor Vasilyev OKay I understand the usage of for and while now. But
find
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.â sabarish jackson
Oct 16 '17 at 12:01
@Egor Vasilyev OKay I understand the usage of for and while now. But
find
command isn't returning any output. I even changed the single quotes to double quotes, even then the find isn't returning any output.â sabarish jackson
Oct 16 '17 at 12:01
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@sabarish jackson, can you update your answer with the latest script code?
â Egor Vasilyev
Oct 16 '17 at 12:05
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@EgorVasilyev I have edited my question with output and edits in script. Please look into it.
â sabarish jackson
Oct 16 '17 at 12:19
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
@sabarish jackson, $PATH - is built-in shell variable. You need to use different variable name such as $PATH_TO_FOLDER or something else. See answer by Kamil Maciorowski
â Egor Vasilyev
Oct 16 '17 at 12:30
 |Â
show 1 more comment
up vote
4
down vote
$PATH
is important variable with meaning. You should choose another name.
In this case find
executable cannot be found because $PATH
doesn't lead to it. You are not notified because of 2>/dev/null
.
echo
is probably a shell builtin, it needs no $PATH
to work. The same for for
etc.
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output./NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. Withcat
they make the content ofSTAT44.txt
be assigned to the variable.
â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
add a comment |Â
up vote
4
down vote
$PATH
is important variable with meaning. You should choose another name.
In this case find
executable cannot be found because $PATH
doesn't lead to it. You are not notified because of 2>/dev/null
.
echo
is probably a shell builtin, it needs no $PATH
to work. The same for for
etc.
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output./NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. Withcat
they make the content ofSTAT44.txt
be assigned to the variable.
â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
add a comment |Â
up vote
4
down vote
up vote
4
down vote
$PATH
is important variable with meaning. You should choose another name.
In this case find
executable cannot be found because $PATH
doesn't lead to it. You are not notified because of 2>/dev/null
.
echo
is probably a shell builtin, it needs no $PATH
to work. The same for for
etc.
$PATH
is important variable with meaning. You should choose another name.
In this case find
executable cannot be found because $PATH
doesn't lead to it. You are not notified because of 2>/dev/null
.
echo
is probably a shell builtin, it needs no $PATH
to work. The same for for
etc.
answered Oct 16 '17 at 8:46
Kamil Maciorowski
1,0791523
1,0791523
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output./NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. Withcat
they make the content ofSTAT44.txt
be assigned to the variable.
â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
add a comment |Â
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output./NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. Withcat
they make the content ofSTAT44.txt
be assigned to the variable.
â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output.
/NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
Okay. Now I changed the PATH to PATHS, even then it isn't working. I am getting the below output.
/NO/20171013/ 655044810645 734729751028 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '655044810645' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0 find /NO/20171013/ -type f -name "*.txt" -exec grep -w '734729751028' ; 2>/dev/null | /usr/bin/wc -l 0 LINES 0
â sabarish jackson
Oct 16 '17 at 8:52
@steeldriver These backticks may be right. With
cat
they make the content of STAT44.txt
be assigned to the variable.â Kamil Maciorowski
Oct 16 '17 at 10:36
@steeldriver These backticks may be right. With
cat
they make the content of STAT44.txt
be assigned to the variable.â Kamil Maciorowski
Oct 16 '17 at 10:36
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
@KamilMaciorowski oops you are right - must remember not to post before coffee ;)
â steeldriver
Oct 16 '17 at 10:38
add a comment |Â
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%2f398354%2ffind-command-not-working-in-shell-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