1st error was that ... | read msgtime invokes read in a subshell and therefore the value of msgtime is not accessible outside of that. (edit: well, not that it'd work without an input to awk)
This error is that you cannot put spaces around the = when doing an assignment. msgtime=`echo ...
itkamaraj's solution is a great one, or do you need to capture it and do more processing with $msgtime?
This User Gave Thanks to neutronscott For This Post:
I have a file with userIDs, one per line no spaces. I have a script that accepts userIDs as a parameter and outputs information about them. What I have had to do in the past was to modify each line of the file with userIDs to call the script with the userID and pipe the output to a data file.
... (2 Replies)
Hi,
I am writing a shell program that executes a lot of Oracle SQL Files on different databases based on the enviroment setting value. I am trying to design a parameter file where i can store the environment values for all the databases in the below format
Environment File
File Name... (6 Replies)
why does this not work?
#include <stdio.h>
#include <stdlib.h>
char getFileMode(char charChanger) {
char filetype; /*var to hold the value to be returned*/
filetype = charSetter; /*set filetype to "l" if it is a symlink*/
return filetype;
}
int main(void){
char... (8 Replies)
Hi ,
I Have following requirement:
DB2 Sql query to pass from a parameter file
for example, I would create a parameter file with (SELECT column 1, column 2 FROM Table name) then job would read it and create a file with the contents named table.txt
How to write/modify below ksh script to... (10 Replies)
my program is designed to take the first parameters as extension, then the rest of the parameters as files to be searched for and, if found, modified by the extension. If not found, it prints an error.
Everything is great until: ./chExt.sh 'com' 'king cobra.dat'
where $file splits up the two... (2 Replies)
Hi I have created the following shell script file with the following content.
#!/bin/csh
set VAR1="abcxyz" << EOF
EOF
echo "---------------------"
echo "VAR1 = $VAR1"
echo "---------------------"
i am not able to echo the previously set VAR1.
Can any one suggested what could be wrong?... (5 Replies)
Hi All,
I have written a shell script to compile an oracle R12 form and also a procedure is called from it. The procedure registers the form, function and creates a menu entry.
I took directory as a parameter. Code is as below:
#!/bin/ksh
echo... (3 Replies)
Hi All,
I need urgent Help from all of you here.
Below is my code-
==================================================
#!/usr/bin/sh
cd $1
cat $2 | tr -ds "$" "" > parameter_file.param
export `parameter_file.param`
chmod 777 parameter_file.param
echo $1
echo $2
cd $prmDirInput... (5 Replies)
Discussion started by: Amit786
5 Replies
9. Post Here to Contact Site Administrators and Moderators
Variable I have in my shell script
diff=$1$2.diff
id=$2
new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk -F'~' ''$2 == "$id"' {print $0}' > $new
I could see value of $id is not passing to the awk... (0 Replies)
Discussion started by: Ashunayak
0 Replies
10. Forum Support Area for Unregistered Users & Account Problems
I'm getting the following error (or something similar) whenever I try to view a thread when I'm logged in.
That is, I login, hit "New Posts", get a list of theads, click on one (in this example is was the "Not allowed to post URLs" thread), then get the following HTML error page instead of the... (1 Reply)