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
Hi all,
I have date and time value in a string,
I want to check if it is a valid date and time.
Need help on this.
Thanks (7 Replies)
Discussion started by: Pratiksha Mehra
7 Replies
3. Shell Programming and Scripting
Hi All,
How to fetch the particular row based on my search command. For example
Source Column
Column A Column B
001,56123456
002,57123456
003,123456
Expected Output:
003,123456
To get this output I tried below mentioned function
grep '123456' filename.txt (4 Replies)
Discussion started by: suresh_target
4 Replies
4. Shell Programming and Scripting
Hi Forum.
I tried to search the forum posts for an answer but I haven't been able to do so for what I'm trying to accomplish.
I have the following source file:
11936385~TFSA|11936385|4431|3401458067|10/09/1982|25.00|IBSBONUS|3200|||||CASH|
3401458067|1005|... (3 Replies)
Discussion started by: pchang
3 Replies
5. 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
6. Shell Programming and Scripting
How to find a string which is entered in command promt is a valid unix command or not?.
Thanks in advance
~Saravana (2 Replies)
Discussion started by: tsaravanan
2 Replies
7. Shell Programming and Scripting
Hi,
I am passing date string of format 'YYYYMMDD' to a ksh script.
Will I be able to get next valid date from the passed in string.
Example I pass '20100228' to the shell script, Is there a reverse date command to get '20100301' .i.e to convert '20100228' to date and get next date.... (5 Replies)
Discussion started by: bittoo
5 Replies
8. 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
9. Shell Programming and Scripting
Hi,
I have a little Perl question.
I need to determine the last word in the following string:
h t t p://abc.def.com/hijklm
The output should be the string hijklm.
h t t p is of course http.
The string between the slashes always differs.
The string after the last slash always differs.... (4 Replies)
Discussion started by: ejdv
4 Replies
10. 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