03-28-2019
Still not clear why you (a) pipe (b) nothing into yad. Does it need meaningful data on its stdin?
a) piping is (not illegal but) not an apt way to put execution of commands into a certain order. If not reading from stdin, the second command may be finished before the first does anything meaningful.
b) No info will be supplied by your script; anything found will be output to $tot_files_found.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
Discussion started by: arsidh
10 Replies
2. Shell Programming and Scripting
Hi,
I use AIX (ksh) and Linux (bash) servers. I'm trying to do scripts to will run in both ksh and bash, and most of the time it works. But this time I don't get it in bash (I'm more familar in ksh).
The goal of my script if to read a "config file" (like "ini" file), and make various report.... (2 Replies)
Discussion started by: estienne
2 Replies
3. Shell Programming and Scripting
Hello all,
I'm working on a script, and as part of it, I'm trying to create a loop that will run through a stored piece of information a certain number of times pulling out information, and each time create a variable with a unique name that will store that information. I'm sure it's a simple... (3 Replies)
Discussion started by: DeCoTwc
3 Replies
4. Shell Programming and Scripting
Hello all,
I have this shell script, but do not understand why the variables inside the if block does not keep its value outside. Is it because of the pipe ? How can i fix this problem ?
Thank you for helping.
local alarm=""
local num_alarm=0
local -a alarms
... (3 Replies)
Discussion started by: trickstar
3 Replies
5. Shell Programming and Scripting
Hello,
I am struggling with using variable made using "eval".
a=4
eval b$a=20
echo $b$a ???
As shown above, I am trying to call back the variable "bX" assuming I do not know the value of "a".
How can I do that?
I tried several combinations but nothing worked.
Thanks (10 Replies)
Discussion started by: jolecanard
10 Replies
6. Programming
Hi,
I wrote the following program to understand mutexes. If I run the program , number of threads is shown as zero, even after creating one thread. When running with gdb, it works fine.
The function process is used to update global variable (used to keep track of threads). It looks like the... (2 Replies)
Discussion started by: sanjayc
2 Replies
7. Shell Programming and Scripting
$ p="1 2 5 8"
$ set -- $p
$ echo $3
5
$ k=3
$ echo \$${k}
$3
I want the "echo \$${k}" to get the output 5 , how to modify ? (6 Replies)
Discussion started by: yanglei_fage
6 Replies
8. Shell Programming and Scripting
#aa=xxxx
#zz="cc $aa"
#aa=gggg
#echo $zz
out put is
cc xxxx
if I want to get
cc gggg
how should I do, I don't want to write zz="c $aa " after aa=gggg (2 Replies)
Discussion started by: yanglei_fage
2 Replies
9. Shell Programming and Scripting
Hello,
Can I ask how to expand variable that contains another in bash? I need to loop variable within another one like this:
RD1=testgrp
RD2=testgroup
RD3=testgroupfile
RD4=tstgroup
...
RD40=try2013
DEST=/home/king/finaldir
for i in {1..40}; do
mv ${RD${i}} ${DEST}
done
I do not... (8 Replies)
Discussion started by: yifangt
8 Replies
10. UNIX for Beginners Questions & Answers
Hi Team
In the below code, irrespective of the if statement that gets executed, retcd is being assigned a standard value(1) instead of changing as per code. Could you please help to see where is it going wrong.
rval=0
CONF_FILE=/apps/wmroot/scripts/props/UMPath.properties
NOHUP="nohup"... (3 Replies)
Discussion started by: harishshankar
3 Replies
LEARN ABOUT NETBSD
time_uptime
TIME_SECOND(9) BSD Kernel Developer's Manual TIME_SECOND(9)
NAME
time_second, time_uptime, boottime -- system time variables
SYNOPSIS
#include <sys/time.h>
extern time_t time_second;
extern time_t time_uptime;
#include <sys/kernel.h>
extern struct timeval boottime;
DESCRIPTION
The time_second variable is the system's ``wall time'' clock. It is set at boot by inittodr(9), and is updated periodically via
timecounter(9) framework, and also updated by the settimeofday(2) system call.
The time_uptime variable is a monotonically increasing system clock. It is set at boot, and is updated periodically. (It is not updated by
settimeofday(2).)
The boottime variable holds the system boot time. It is set at system boot, and is updated when the system time is adjusted with
settimeofday(2). The variable may be read and written without special precautions.
All of these variables contain times expressed in seconds and microseconds since midnight (0 hour), January 1, 1970.
The bintime(9), getbintime(9), microtime(9), getmicrotime(9), nanotime(9), and getnanotime(9) functions can be used to get the current time
more accurately and in an atomic manner.
Similarly, the binuptime(9), getbinuptime(9), microuptime(9), getmicrouptime(9), nanouptime(9), and getnanouptime(9) functions can be used to
get the time elapsed since boot more accurately and in an atomic manner.
SEE ALSO
clock_settime(2), ntp_adjtime(2), timeval(3), hardclock(9), hz(9)
BSD
March 13, 2008 BSD