Hi guys i'd like to show you this code of my script, where i couldn't find this error
" [ !-d: commando not found"
"Syntax error near unexpected token `fi' "
my code:
Code:
#!
Hi everyone, I'm really new in shell scripting and having trouble resolving this error.
Can someone please tell me why I'm getting these errors?
Error Message:
./test.sh: line 50: unexpected EOF while looking for matching `''
./test.sh: line 53: syntax error: unexpected end of file
Code:
#!/bin/sh
counter=0
logloc=/home/songja/ServerLogs
backup=/home/songja/test
## Reads the location of
Hi I have coded this bash script to count the number of tabs in file.but when i run the script i am getting this error. what
is the mistake i ve done?
line 5: syntax error: "(" unexpected
Code:-
#!/bin/sh
#
FILE='unit-1-slide.txt'
OUTPUTFILE='output-for'- $FILE'
COUNT=$(awk'{print gsub(/\t/,"")}' $FILE)
OUTPUT_PATH='/home/user/Desktop'
echo $COUNT >> $OUTPUTFILE
echo "Done!"
First I write a configfile with all my parameters like this
path="/home/test/"
I name it test.conf.
Then I write a shell script with this content, name it test, and make it executable with chmod +x.
#!/bin/bash
#read the config file
.
Cygwin bash script was invoked in bash shell as follows:
Code:
/cygdrive/c/cygwin/bin/bash test.sh
This is content of my script
Code:
#!/bin/bash
#
exec 3</cygdrive/c/cygwin/home/work/part1.txt
read -u 3 x
echo $x
exec 3<&-
Commands work correctly when issued one at a time within bash shell.
But when I attempt to run the shell script I get
I am making a shell script that will have "shortcuts" to do different tasks and I can't get what I'm doing wrong (this is just a test script)
Code:
read cake
if [ $cake == "1" ] then
echo "1 it is"
fi
it outputs:
Code:
1:
: bad variable namecake
test.sh: 27: test.sh: Syntax error: end of file unexpected (expecting "then")
After some server update I am no able to execute an C program (it was working yesterday and something was changed in my server causing this problem).
I've at this folder /home/int/exe/ a c program named aesdecript with 777 permission.
Hi guys..i'm totally new to linux shell scripting and i have written a simple script that allows to poll a directory and when there is at least one file, it is moved to another directory.
But i have an error in the if statement " Syntax error: "then" unexpected (expecting "done")"
Code:
#!/bin/bash
while true
do
count=$(find /home/dirA -type f | wc -l)
#!/usr/bin/perl
use strict;
use warnings;
my $file;
my @files;
my $parse;
my @files = <*>;
foreach $file(@files)
chomp ($file);
{
$parse = system qq(paste <(cut -f1,2,13 $file) <(cut -f12 $file));
}
"my" variable @files masks earlier declaration in same scope at Rast_seq.pl line 11.
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "(" unexpected
sh: 1: Syntax error: "("