Search Results

Search: Posts Made By: pokerino
6,985
Posted By pokerino
if you want replace value in the file you need to...
if you want replace value in the file you need to add -i option to sed. For a correct replacement of the keyword $value you need to change the single quote to double quote:
sed...
6,985
Posted By pokerino
in sed command use a double quote instead a...
in sed command use a double quote instead a single quote.
6,985
Posted By pokerino
You can write the filenames replacing $1 and $2. ...
You can write the filenames replacing $1 and $2.
Or insert a variable like $MYFILE_1 and $MYFILE_2, in replace $1 and $2, and put the value in the head fo your big script file.
6,985
Posted By pokerino
You write the code in a file called...
You write the code in a file called newfile.shMake this file executable with chmod 750 newfile.shrun with ./newfile.sh sec.txt disp.txtthe parameter -lt is "less than" you can also use -gt "greater...
6,985
Posted By pokerino
Hi, try this: #!/bin/bash if [ "$(...
Hi,

try this:

#!/bin/bash

if [ "$( cat $1)" -lt "$( sed -n '4 p' $2)" ]
then
echo "less than"
fi
with parameter sec.txt disp.txt
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 12:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy