Solaris script using awk giving errors - please advise
I'm using solaris 10
Scenario as follows
I have a logfile with 2 columns:
column 1 = source directory + filename
column 2 = destination directory + filename
Using cron, my script polls for new files and adds them to the logfile ($ELOG) as described above. Using sed, the distination directory is created by changing 1 one the sub-directory locations
I'm trying to use awk to parse the file:
- encrypt the file
- copies the file to the destination folder
...
...
(ENCRYPT is a 3rd party executable file)
When I run the shell script, I get the following errors:
__________________
Can you help advise where/what I am doing wrong. Equally, if there is a smarter way of completig this task, that would be great too
Thanks in advance
David
Moderator's Comments:
Please use code tags next time for your code and data.
Original script written on CentOS 6.3 with GNU bash 4.1.2
Destination system is Solaris 9 with GNU bash 2.05 (not changeable by me)
I have a script written on the linux side but now we need to provide a version to another site that "doesn't like linux". I've been going through changing the ] or... (13 Replies)
Hi
I have been able generate a file ($ELOG) that can have multiple lines within it. The first column represents the full path source file and the other is the full path target ... the file names are the same but the target directory paths are slightly different.
<source_dir1>/file1 ... (4 Replies)
I am new to setting up sun solaris 10 cluster, I have 2 sun sparc t3-1 servers (identical), going to use them as web servers (sun one java web server 7), looking for data replication and real time fail over. My question is do I need external storage to configure the cluster? or I can just use... (3 Replies)
Hi,
My script is working fine in AIX but throwing an error in SOLARIS system.
Here is the error message that I am getting when calculating the elapsed time:
/home/x772525/FindETA.sh: start_mins = *60 + : syntax error
.
((start_mins = $(expr substr "$j" 1 2)*60 + $(expr substr "$j" 4... (6 Replies)
Hi folks,
I am facing issue of my system (host1) getting hanged after throwing following ntpd messages. I am not able to ssh to the server there after. only option is to restart the host:
Dec 29 02:58:51 host1 ntpd: time reset -0.207907 s
Dec 29 02:58:51 host1 ntpd: synchronisation lost
Dec 29... (0 Replies)
When running dmesg, the output is a long list of the following:
ACPI Error: No object attached to node 0xffffff00016622e0 20090521 exresnte-211
ACPI Error (uteval-0329): Method execution failed (Node 0xffffff00016622e0), AE_AML_NO_OPERAND
As a workaround I resort to sysctl, which gives... (0 Replies)
Hi gurus,
i need your advise on how to process this file using awk.
i have this file
COLA COLB COLC COLD COLE COLF COLG COLH
AAAA 86 111 122 133 144 155 266 377
BBBB 70 211 222 233 244 255 266 ... (6 Replies)
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Hi all
Here I came accross a situation which i am unable to reason out...
snippet 1
psg ServTest | grep -v "grep" | grep -v "vi" | awk '{
pgm_name=$8
cmd_name="ServTest"
gsub(/]*/,"",pgm_name)
if(pgm_name==cmd_name) { print "ServTest Present =" cmd_name}
}'... (10 Replies)
Hi,
Has anyone used gcc compiler and know alot about it? I am compiling a file with:
gcc -o xyz xyz.c abc.o -lsocket -lnsl
it compiles pretty fine.
But whe I use switches
gcc -o -Wall -pedantic -ansi xyz xyz.c abc.o -lsocket -lnsl
it starts giving illogical, rather I should say stupid... (1 Reply)