Hello all,
I am trying to write a simple script that will parse through a text/properties file and check a couple of if statements.
Here is what I have so far:
FILENAME=$1
while read line
do
echo $line
done < $FILENAME
When I call ./simple.sh testfile.txt I recieve a file or... (7 Replies)
Hi y'all...I've been wracking my brain over this very simple script that reads in a textfile and echos each line. But I keep getting an error.
Below is my script:
#!/bin/bash
while read myline
do
echo $myline
done < t_file-20080221.01.asc
The error I am getting is:
syntax error... (1 Reply)
Hi folks... I really need some help soon with this issue I am having when I run my script using 'nohup'. Below is a function 'checkReturn' that my script uses to check whether other functions or tasks errored out with a non-zero exit code.
function checkReturn {
if ; then
... (2 Replies)
The following is a piece of code to rename LOG_FILE_NEW to LOG_FILE once you get a result (either RUNNING or SHUTDOWN)
RESULT=""
sleep 30
while ; do
sleep 10
RESULT=`sed -n '/RUNNING/'p ${LOG_FILE_NEW}`
if ; then
RESULT=`sed -n '/SHUTTING_DOWN/'p ${LOG_FILE_NEW}`
fi
done
mv... (3 Replies)
hi,
I'm a newbie to shell scripting. I wanted to initialise an array using basic for loop and read it.
Then i want to print it as a .CSV file..
Any help would me much appreciated.. (1 Reply)
Hi,
I am trying to read the contents of a file using array credentials in unix. The file I am trying to read is tab separated and contains the below contents.
# partnerid Direc Server Port Source_Dir Target_Dir Mask Remove Files Passwordless Compare Files ... (3 Replies)
#!/bin/bash
count=1
while read line
do
if (($count > 4)); then
awk -v var1="$count" '{printf "%3s%8s%11s%11s%11s\n",var1,$2,$3,$4,$5}'
else
echo $line
fi
count=$((count+1))
done < posre_sub.itp > test
cat test
INPUT:
; position restraints for... (3 Replies)
1. The problem statement, all variables and given/known data:
Hello!
I need help with this problem bash shell scripting that basically just reads the data in a tab delimited file and does the following below
1. Read in the data file Survey.txt and assign the column values to variables of... (6 Replies)
Hello,
I am having issues setting the "read-only" flag via Windows Explorer on my AIX Samba share...
I have on my AIX 7.1 system installed Samba 3.6.24 and configured, joined to our Windows domain successfully.
The samba binaries I got from perzl.org/aix
In my smb.conf I have...
... (1 Reply)
Guys, need your help urgently.
ServerA
ServerB
ServerA has an email facility and can connect remotely via root using key to ServerB
What I am trying to achieve here is ServerA would be able to remotely:
1. Do command 'touch /mnt/testfile.date' on ServerB
2. If touch failed with... (4 Replies)