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. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
3. Shell Programming and Scripting
Hello,
I have something that should be very simple yet I am losing my head in figuring out how to get it to work:
I am calling a function passing a parameter, this will return a particular string, next I want to substring the returned value and break it apart.
All of this I want to do on a... (2 Replies)
Discussion started by: gio001
2 Replies
4. Shell Programming and Scripting
Hi all,
I am wondering how can I check when a variable has nothing returned in it. I am trying to store a pid in this variable to see if a script is running in the background. So I am using something like that
proc_pid=`ps -ef |grep script.sh|grep -v grep|awk '{print $2}'`
if
then
... (1 Reply)
Discussion started by: geovas
1 Replies
5. Shell Programming and Scripting
can anyone please help me with this:
i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure...
... (4 Replies)
Discussion started by: swap21783
4 Replies
6. 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
7. UNIX for Dummies Questions & Answers
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies
8. Shell Programming and Scripting
Hi Friends,
REQUIREMENT: Want to delete files from the current directory match with the same in the file test.txt
set -x
i=1
echo "i=$i"
COUNT=`sed -n '$=' test.txt`
echo "Count=$COUNT"
while
do
"## Here is error##"
FILETOREMOVE=`sed -n \'$i,1p\' test.txt`
echo $FILETOREMOVE... (5 Replies)
Discussion started by: sourabhsharma
5 Replies
9. Shell Programming and Scripting
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Discussion started by: sars
4 Replies
10. Shell Programming and Scripting
hi
i have a function.
parse()
{
qname="lpdma111"
qmgr="lpdma111"
qalias="lpqqali"
}
Now the requirement is i want ot get the vaues form the function
start()
{
//retireve the values from the parse function
} (5 Replies)
Discussion started by: Satyak
5 Replies