10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
2. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
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... (2 Replies)
Discussion started by: Ashunayak
2 Replies
3. Shell Programming and Scripting
Input are file and file1
file contains
store.bal
product.bal
category.bal
admin.bal
file1 contains
flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0
store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies
4. Shell Programming and Scripting
Hi,
I have a text file that has a long multi-line db2 CTE query. Now I want to store all the contents of this file (i.e. the entire query) in a shell script variable. I am trying to achieve it by this: query = `cat /Folder/SomeFile.txt` But when I echo the contents of this file by saying echo... (4 Replies)
Discussion started by: DushyantG
4 Replies
5. UNIX for Advanced & Expert Users
sdir;csp os_lib-0.5.24;bdir;cbpdob ---enable-useosstl os_lib-0.5.24;mbp os_lib-0.5.24;
If i run this command in unix shell directly it is running.
sdir;csp HA_util-0.0.7;bdir;cbpdob ---enable-useosstl HA_util-0.0.7;mbp HA_util-0.0.7;
HA_util === Configuring source package
HA_util... (4 Replies)
Discussion started by: girija
4 Replies
6. Shell Programming and Scripting
when I write the kourne shell script on a solaris machaine like this:
#!/bin/ksh
myps =50
echo $myps
and when I run this script with typing "myfile"
, it shows this message:
myfile: myps: not found
I think I write a correct syntax but why a program show error like that. (3 Replies)
Discussion started by: thsecmaniac
3 Replies
7. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
8. Shell Programming and Scripting
Hi
I have one properties file containing as
$INSTALL_BASEPATH/mssages/commonmessages_default.properties
$INSTALL_BASEPATH/resource/configurationBundle.properties
and $INSTALL_BASEPATH is set in .bash_profile
but from shell script when I read this file
and use in copy statement then it... (7 Replies)
Discussion started by: mnmonu
7 Replies
9. Shell Programming and Scripting
Hi,
I am stuck while developing a shell sub-routine which checks the log file for "success" or "failure". The subroutine reads the log file and checks for key word "success", if found it set the variable (found=1). It returns success or failure based on this variable.
My problem is, I can... (2 Replies)
Discussion started by: cjjoy
2 Replies
10. Shell Programming and Scripting
hi all
i have joined new to the group.
i have set an variable in my bashrc file.
.bashrc
PROGHOME=/home/braf/braf/prog
export PROGHOME
but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path.
in my script... (8 Replies)
Discussion started by: krithika
8 Replies