10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everyone
I have a quick perl matching question. I have the following file, and I want to use perl to search through the 2nd column and see if it finds any of the month names (e.g.: Jan, Feb, Mar, ... Dec).
Here's the file I'm trying to search, and here's the code I have so far. Any help... (5 Replies)
Discussion started by: lucshi09a
5 Replies
2. Shell Programming and Scripting
Hi, sorry, two hash related questions in one day .. but this has got me a bit stuck.
I have a mysql database table that kind of looks like this, the table is called "view1" and a snippet of that table (SELECT'ing just rows with serial number 0629AN1200) is below
serial nic_name ... (2 Replies)
Discussion started by: hcclnoodles
2 Replies
3. Shell Programming and Scripting
I am using sed to find a pattern in a line and then I want to retain the pattern + the rest of the line. How is this possible? ie:
line is: 14158 05-15-08 20:00 123-1234-A21/deliverable/dhm.a
search for 123-1234-A21 ie:
echo $line | sed 's/.*\(\{3\}-\{4\}-\{3\}\{5\}\).*/\1/'
... (1 Reply)
Discussion started by: phreezr
1 Replies
4. Shell Programming and Scripting
I've done a quick Google about this, but could not find the answer I want.
Say, there is an array like this:
@A = qw(cd1 a1 ef a2 hij a12 b2 b4 b22);
I want to sort the array in the first order:
@sorted = qw(a1 a12 a2 b2 b22 b4 cd1 ef hij);
And second order:
@sorted = qw(a1 a2 a12 b2 b4... (5 Replies)
Discussion started by: zx1106
5 Replies
5. AIX
Hi,
At best I'm a junior admin with a big problem.
My developers have got my root password and mgmt insists they need it.
I can't even change it when people knowing it leave.
I'm certain they've hardcoded it into routines. I've searched my servers and grepped everything & can't find it.
... (5 Replies)
Discussion started by: keith.m
5 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
Quick question from a fairly new to Unix developer.
if
then
completedLogFile=$logfile.$(date +%Y%m%d-%H:%M:%S)
mv $logfile $completedLogFile
fi
I understand that this portion of code is simply copying a tmp logfile to a completed logfile when a condition is true. The... (2 Replies)
Discussion started by: JohnnyBoy
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
Is there a simple way, using ksh, to find the byte position in a file that a stated character appears?
Many thanks
Helen (2 Replies)
Discussion started by: Bab00shka
2 Replies
8. Shell Programming and Scripting
Hi i just wanted to know is there anyway to log the keystrokes on a remote computer? For example i let my nieces play on my other computer downstairs *my computer and the one downstairs are on a LAN* and i want to see everything they type in to make sure they arent doing anything they are supposed... (1 Reply)
Discussion started by: Corrail
1 Replies
9. UNIX for Advanced & Expert Users
This "SHOULD" be a simple question,
but looking through several books has turned up nothing,
so I turn once again to the experts!!
How do you vi a file so that you can see special characters.
I believe my /etc/passwd file is being corrupted during an upgrade process, however the files... (6 Replies)
Discussion started by: Recon
6 Replies
10. UNIX for Dummies Questions & Answers
Hello There!
I am trying to write this SIMPLE script in Bourne Shell but I keep on getting syntax errors. Can you see what I am doing wrong? I've done this before but I don't see the difference. I am simply trying to take the day of the week from our system and when the teachers sign on I want... (7 Replies)
Discussion started by: catbad
7 Replies