10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have used a bash script which ultimately converts a string into date using date --date option:
DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings
TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime
Please use code tags... (7 Replies)
Discussion started by: Rashu123
7 Replies
2. HP-UX
Wrote a KSH script on a RHEL server and moved it over to the HPUX server and it is not liking a loop that I put together. Here is the simple form of it that does not work in KSH:
for x in {0..$VARIABLE_NAME}
do
echo $x
done
This works:
for x in {0..10}
do
echo $x
... (3 Replies)
Discussion started by: jake0391
3 Replies
3. Shell Programming and Scripting
I found some posts describing how to completely clean out a mailbox in Unix/Linux. But I want to keep the 50 most recent messages. Any ideas out there?
Thanks! (3 Replies)
Discussion started by: OPTIMUS_prime
3 Replies
4. Shell Programming and Scripting
Hi,
I need to do a test Telnet in KSH and if the connection is good then disconnect the telnet session with out logging in and without exiting the shell script.
Example output of a good connection:
$telnet xxx.xx.xx.xxx xxxx
Trying xxx.xx.xx.xxx...
Connected to xxx.xx.xx.xxx.
Escape... (1 Reply)
Discussion started by: calex
1 Replies
5. UNIX for Dummies Questions & Answers
I am using OpenSSH on my sun servers.
There is another suite of sun servers attempting to SSH into my machines.
I am running ssh -vv:
OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006
the other guy is running the sun version of ssh (i don't know what/if any differences there are between... (7 Replies)
Discussion started by: EWTGPAC
7 Replies
6. UNIX for Dummies Questions & Answers
I'm trying to test and see whether a variable that is being extracted from a line in a file is numeric or not. I have tried everything that I can think of and I cannot figure out how to get it to work. I am trying to test and see if the string extracted contains 5 numeric digits. This is what I... (8 Replies)
Discussion started by: developncode
8 Replies
7. Shell Programming and Scripting
I'm loading multiple delimited files into an Oracle DB using sqlldr on Unix. I would like to get only the most recent record per each unique key. There may be multiple updates for each key, but I only want the most recent one.
There is a date column in my delimited files, so I'm using cat to... (2 Replies)
Discussion started by: OPTIMUS_prime
2 Replies
8. Programming
I couldn't compile this code in gcc (SUSE Linux) 4.3.1 20080507.
got me these!
sniffer.c: In function ‘int CreateRawSocket(int)':
sniffer.c:16: error: ‘htons' was not declared in this scope
sniffer.c: In function ‘int BindRawSocketToInterface(char*, int, int)':
sniffer.c:31: error: ‘bzero'... (2 Replies)
Discussion started by: galaxy.ice
2 Replies
9. Shell Programming and Scripting
Okay I will let users input spaces as well :)
I am having a mental block. I have done a couple of searches but havent found anything that I understand (the likes of :alpha: and awk).
Basically I want to give the user an option to enter some text which will go down as a field within a flat... (3 Replies)
Discussion started by: tugger
3 Replies
10. UNIX for Advanced & Expert Users
Is this a bug in ksh on HPUX 11i or is read impromperly documented?
INPUT
Thu Jan 18 09:14:52 PST : CIFS: Virus Detected - File ONTAP_ADMIN$\vol\vol0\DDD\Ventana\Strattoni\Race Stuff\Rumor.exe in share DDD accessed by client CLIENT (111.11.11.111) running as user USER is infected. The filer... (3 Replies)
Discussion started by: Jackaroe
3 Replies