10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Here is my script:
#!/bin/sh
while :;
do
sleep 1
date
done
Please, how can i change this script, i'd like to display the time only of two minutes (period) and exit ? Is that possible ?
Thank you so much for help.
Bests... (3 Replies)
Discussion started by: chercheur111
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I am reading a particular date from a file using below command
WFLWDATE=$(sed '2q;d' FileA.prm)
The echo command outputs the correct date in variable WFLWDATE
Now I want to subtract 5 minutes from this variable. I am on AIX and unable to get anything working as expected.
Can you... (1 Reply)
Discussion started by: vrupatel
1 Replies
3. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help.
Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies
5. Shell Programming and Scripting
I want to get newvar outside the while
any ideas?
while read myline; do
var=${myline}
newvar1=$(let "$var")
done
echo $newvar1
I found it its ok now Thank you! (0 Replies)
Discussion started by: sanantonio7777
0 Replies
6. UNIX for Dummies Questions & Answers
hi,
want to create script that takes name of directory and all files and will copy each file to new directory.
then fix errors like files do not exist or no permission to create new directory...
these what I have so far...
#!/bin/sh
dir=~/Documents/Scripts/Copy
for i in $(pwd) $(ls)... (23 Replies)
Discussion started by: me.
23 Replies
7. Shell Programming and Scripting
Hello guys,
First of all, thanks for taking the time to read my post.
So, here I have a file from my honeypot which record IP addresses and web pages visited. I would like to manipulate it in order to create Snort signatures and ACLs.
But I am having troubles to extract the src IP address and... (6 Replies)
Discussion started by: Benou
6 Replies
8. IP Networking
Hi,
I got a strange issue here: We are using ISC DHCP v4 which is default in Open SuSE 11.4. These two options 'default-lease-time' and 'max-lease-time' are set in all subnets, with values between 43200 (12 hours) to 518400 (144 hours). See partial dhcpd.conf below please.
Now the lease... (5 Replies)
Discussion started by: aixlover
5 Replies
9. Shell Programming and Scripting
Hi Eveyone,
I am working on one shell script to find the specific records from data file and add the totals into variables and print them. you can find the sample data file below for more clarification.
Sample Data File:
PXSTYL00__20090803USA
CHCART00__20090803IND... (7 Replies)
Discussion started by: veeru
7 Replies
10. Shell Programming and Scripting
Hi all,
I want to add a minute to present time.
E.g:
if present time is 09:55, I want to make it 09:56.
Please help!!
I tried below script
#!/bin/ksh
timeut=`date -u '+%R'`
let timeut1=$timeut + 1
echo "timeut1 = $timeut1"
Regards
Prashant:confused: (14 Replies)
Discussion started by: prashant43
14 Replies