10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am not able to execute bash script on Fedora. They were running on another environment. This is a sample script:
#!/usr/bin/bash
input="./data/heu/hout1"
i=1
j=0
while IFS= read -r file1
do
#Some code here
done < "$input"
#echo $j
I get an error:
bash: s.sh: command not... (3 Replies)
Discussion started by: ngabrani
3 Replies
2. Shell Programming and Scripting
I'm new to utilities like socat and netcat and I'm not clear if they will do what I need.
I have a "compileDeployStartWebServer.sh" script and a "StartBrowser.sh" script that are started by emacs/elisp at the same time in two different processes.
I'm using Cygwin bash on Windows 10.
My... (3 Replies)
Discussion started by: siegfried
3 Replies
3. Shell Programming and Scripting
Good evening, I'm currently working on a BASH script to convert audio between file formats and I've come across a snag. At the beginning of the script, I'm having the system check to see if any files with the .m4a extension exist in the directory, and if so, it runs the script. If there are no... (1 Reply)
Discussion started by: KBurkholder
1 Replies
4. Shell Programming and Scripting
Hi,
I am working on bash script after a long time. I am getting error near done statement while running a for loop snippet. The error says "Syntax error near unexpcted token 'done'"
please suggest what could be wrong. here is the snippet
elements=${#option_arr} //an array of values... (1 Reply)
Discussion started by: arundhati_s
1 Replies
5. Shell Programming and Scripting
Im in a intro to unix class and we have to create a a basic program to look up an argument in a large file.
when no argument is given he wants us to produce a error messgae, well this works but it also produces another error message because my variable now equals nothing.
#! /bin/bash ... (3 Replies)
Discussion started by: laxkrzy
3 Replies
6. Shell Programming and Scripting
Hi All,
I have a script which is supposed to connect to Windows machine and FTP a file into LINUX.
Script is like below
#!/usr/bin/sh
ParamterFle=${1}
//grepping all parameters
BossFtpLog=${2}
// assigning log file
ftp -i -n host_name << EOF
user1
password1
cd /drive1/drive2
get... (6 Replies)
Discussion started by: Raamc
6 Replies
7. Shell Programming and Scripting
Howdy all, I have a scritp that does a sqldump. But for some goofy reason, a certain part of it behaves uber strange.
It does a daily dump of my sql, according to parameters I enter in hardcode.
The script is:
#!/bin/bash
APP_NAME="app_com_site"
wikiname="wiki_com_site"
... (8 Replies)
Discussion started by: saariko
8 Replies
8. Shell Programming and Scripting
I'm trying to write a simple script that takes all the .tar.gz files in a directory and verifies them by using the gzip -tv command:
for zip in *.tar.gz
do
gzip -tv $zip
if ; then #Check return code from tar
echo "File ${zip} verified OK."
exit... (4 Replies)
Discussion started by: kelldan
4 Replies
9. Shell Programming and Scripting
I'm currently playing with the below script;
#!/bin/sh
for d in /export/home/siward/staff/pasit/jamiecr/scripts/first-file.sh \
/export/home/siward/staff/pasit/jamiecr/scripts/second-file.sh \
/export/home/siward/staff/pasit/jamiecr/scripts/third-file.sh \
... (13 Replies)
Discussion started by: JayC89
13 Replies
10. Shell Programming and Scripting
SEND_MESSAGE=test
echo $SEND_MESSAGE
if
then
echo `date` > update_dt_ccaps.lst
echo "The file transfer failed" >> update_dt_ccaps.lst
SEND_MESSAGE=false
fi
The above code is showing error in bash shell as :
./test: line 5: [: test: integer expression expected
... (2 Replies)
Discussion started by: DILEEP410
2 Replies