08-16-2019
The shell concatenates $1 and 09:45 so it becomes $109:45 in the perl code, and perl sees $109
With the braces it becomes ${1}09:45
The trailing /g (g option) is nonsense here; the attempt to redo the substitution will never succeed.
This User Gave Thanks to MadeInGermany For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How would you convert lets say a 1000 minutes to hours, minutes, seconds (1 Reply)
Discussion started by: Vozx
1 Replies
2. UNIX for Dummies Questions & Answers
can someone please check my answers for the crontabs I am making
1. how would I set up a crontab tab executes every 2 minutes each and every day of the week?
answer: 2 * * * * /path/to/file.pl <-- is this correct?
2. how would I set up a crontab that executes every 24 hours at 2am?... (6 Replies)
Discussion started by: Bobafart
6 Replies
3. Shell Programming and Scripting
Hi experts,
I am reading two log files and passing dates as output to a txt file.
Code is given below:
echo "Start Time:" >> Report.txt
cat start.log | while read LINE1
do
echo $DATE1 >> Report.txt
done
echo "End Time:" >> Report.txt
cat end.log | while read LINE2
... (7 Replies)
Discussion started by: Sreejith_VK
7 Replies
4. Shell Programming and Scripting
Hi
I need to run a script every five minutes and it should run between 07-15 hours all days.
How i can achieve this...
i tried like this
*/5 07-15 * * * /scripts/CreateFtpData.sh
It throws an error... (1 Reply)
Discussion started by: aemunathan
1 Replies
5. Shell Programming and Scripting
Hi
i want to print the time of a process in hours only..(or) in minutes only.Is there anyway to print the process such like that
when i give the commnand like following
#ps -eo pid,time
PID TIME
412 01:49:32
481 00:03
it shows in HH:MM:SS format:
Could anyone... (1 Reply)
Discussion started by: srikanthg
1 Replies
6. Shell Programming and Scripting
I have a problem. I am working on a Call Detail Report system. Come to find out the phone switch does not report in seconds. It is a 5 digit field that reports h:mm:ss
The problem is I have 1-5 digit numbers
Ie 1 = 1 second and should be reported as 0:00:01
22 should be 0:00:22
321 should be... (5 Replies)
Discussion started by: truecall
5 Replies
7. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
8. UNIX for Advanced & Expert Users
Is there an easy way to find files modified by hours? If you wanted to find something modified by like 28 hours then I know you could do this:
find . -mmin -1440It is pain to break out a calculator and calculate in minutes. Could you do something similar to this? I know I don't have the right... (1 Reply)
Discussion started by: cokedude
1 Replies
9. Shell Programming and Scripting
can someone help me translate the following command, from:
/usr/bin/awk "/^$TOFDAYM $TOFDAYD /,0" $LOGFILE
to something like
perl -e .....
basically, i want to use perl to do awk functions within a shell script. i want to do the above awk, using perl.
any suggestions? (9 Replies)
Discussion started by: SkySmart
9 Replies
10. UNIX for Beginners Questions & Answers
Hi, please help with below time conversion to minutes.
one column values:
2 minutes 16 seconds 420 msec
43 seconds 750 msec
0 days 3 hours 29 minutes 58 seconds 480 msec
11 seconds 150 msec
I need output in minutes(total elapsed time in minutes) (2 Replies)
Discussion started by: ramu.badugula
2 Replies
vfragpg(8) System Manager's Manual vfragpg(8)
NAME
vfragpg - prints a single header page of a frag file
SYNOPSIS
/sbin/advfs/vfragpg special page_LBN
OPERANDS
Specifies the block special device name, such as /dev/disk/dsk2c. Specifies the logical block number of the page.
DESCRIPTION
The vfragpg command allows you to see the structure of a single header page in a frag file.
Use showfile -x /usr/.tags/1 to locate the logical block number of the page.
RESTRICTIONS
You must have root user privileges to access this command.
EXAMPLES
The following example shows the headers for the frag file with logical block number 10672 on the device /dev/disk/dsk3a: # vfragpg
/dev/disk/dsk3a 10672
self 0 nextFreeGrp -1 fragType 6 freefrgs 14 ver 1
frag on free list : 43, nextFree = 49 frag on free list : 49, nextFree = 55 frag on free list : 55, nextFree = 61 frag on
free list : 61, nextFree = 67 frag on free list : 67, nextFree = 73 frag on free list : 73, nextFree = 79 frag on free
list : 79, nextFree = 85 frag on free list : 85, nextFree = 91 frag on free list : 91, nextFree = 97 frag on free list :
97, nextFree = 103 frag on free list : 103, nextFree = 109 frag on free list : 109, nextFree = 115 frag on free list : 115,
nextFree = 121 frag on free list : 121, nextFree = -1 #
SEE ALSO
advfs(4), showfile(8), shfragbf(8)
vfragpg(8)