10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Trying to find out how to discover if the first 2 characters of a string are "22"
Not sure how.
I could use
if ]; then echo "yes";fi
But I think that will only grab the pattern 22 and not the first 2 digits. (5 Replies)
Discussion started by: newbie2010
5 Replies
2. Shell Programming and Scripting
Dear All,
I have a string "1234567899*0#123456789#", it can be divided into:
- 1st: 1234567899 Validation: 10 digits, only 0-9
- 2nd: *0# Fixed Value
- 3rd: 123456789 Validation: 9 digits, only 0-9
- 4th: # Fixed Value
Would like to know if any 1 line statement perl,... (5 Replies)
Discussion started by: jimmy_y
5 Replies
3. Shell Programming and Scripting
Possible filenames:
CDD_Whatever.txt
DDD_Whatever.txt
If the file prefix = CDD, I'd like to prefix every person ID (second column in my examples below) on the file with "c-"
If the file prefix = DDD, I'd like to prefix ever person ID with "d-"
Input:
Desired Output:
Any help... (2 Replies)
Discussion started by: lrluis
2 Replies
4. Programming
Hi,
I have 5 files as below
$ ll sam*
-rw-rw-rw- 1 sam ugroup 0 Mar 21 06:06 sam3
-rw-rw-rw- 1 sam ugroup 0 Apr 3 22:41 sam2
-rw-rw-rw- 1 sam ugroup 17335 Apr 10 06:07 sam1
-rw-rw-rw- 1 sam ugroup 5 Apr 10 07:53 sam5
-rw-rw-rw- 1 sam ugroup 661 Apr 10 08:16 sam4
I want to list out... (4 Replies)
Discussion started by: sam05121988
4 Replies
5. Shell Programming and Scripting
Hi there,
I tried and tried, but cannot solve this myself.
I have this string:
enterprises.alcatel.nmu.genos.alarmHandoff.alarmHandoffPurge.purgelistAlarmIds.0 = {alarmId=63868|friendlyName=Dortmund/r01sr1sl01/port#06-#01-Vc12|probableCause=Server Signal... (3 Replies)
Discussion started by: ejdv
3 Replies
6. Shell Programming and Scripting
Hi there,
I wonder if it is possible the determine a name of a directory which is different on various hosts.
Let me try to explain.
I have the directory /tmp/dir1/dir2/canchangedir.
This directory name is different on various hosts.
I need to use the directory name, independent from the... (2 Replies)
Discussion started by: ejdv
2 Replies
7. Shell Programming and Scripting
Hi,
Is there a way to determine if a Script is called from a
CRON job or from a commandline
Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies
8. Shell Programming and Scripting
I have a variable (say $A) and while passing it gets either a number or some other string. Now how can test (with if else) whether the variable is just a ne or something else ?
Thanks a lot to all in advance
C Saha (2 Replies)
Discussion started by: csaha
2 Replies
9. Shell Programming and Scripting
Hello
i will like to know please how can i determine file type inside perl script
not using the unix "file" program
Thanks allot (1 Reply)
Discussion started by: umen
1 Replies
10. Shell Programming and Scripting
I know how to ping in Perl. That is easy. What I am wondering is if there is a way for Perl to determine whether the ping was successful or not. Or do I need to save the results out and parse the results seperately looking for the #of tries and successful revieves.
Thanks. (1 Reply)
Discussion started by: gdboling
1 Replies