9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Case 1 :
A=88^M
&& echo "PASS"
Result:
PASS
Case 2:
A=88
&& echo "PASS"
Result:
PASS
I would like to know why Case 1 and Case 2 got the same result? What make ^M ignored ?
Thanks in advance. (6 Replies)
Discussion started by: montor
6 Replies
2. UNIX for Dummies Questions & Answers
I apologize if this treads already covered ground (which I sure it must have), however I wasn't able to determine what I needed from searches.
I'm trying to do detemine if a string represents a file name or not (i.e., is in the form "string.ext" or just "string"), by seeing if there's a period... (2 Replies)
Discussion started by: deepstructure
2 Replies
3. Shell Programming and Scripting
Hi,
I have field in a file which would come with any special character, how do i check that field?
Eg: @123TYtaasa>>>/ 131dfetr_~2
In the above example, how do I add pattern for any special character on the keyboard.
Thanks (3 Replies)
Discussion started by: techmoris
3 Replies
4. Shell Programming and Scripting
Hi,
I have a file 'imei_01.txt' having the following contents:
$ cat imei_01.txt
a123456
bbr22135
yet223
where I want to check whether the expression 'first single alphabet followed by 6 digits' is present in the file (here it is the first record 'a123456')
I am using the following... (5 Replies)
Discussion started by: royalibrahim
5 Replies
5. UNIX for Dummies Questions & Answers
Alright, I am stuck here.
I have this variable that stores the word = HELLO and I have converted it it to -----
I have asked user to input one character at a time. SAy, if they enter E.
Therefore, I need to search 2nd character and input E there.
makes it -E--- (other checkings have been... (2 Replies)
Discussion started by: felixwhoals
2 Replies
6. Shell Programming and Scripting
Hello Experts,
Can someone help me here:
I have a variable which contains a string with "".
set var1 {a}
set str1 {a is the element i want to match}
Now "regexp $var1 $str1" does not work?
("regexp {a\} $str1" works, but var1 gets it's value automatically from another script)
Is... (6 Replies)
Discussion started by: sumitgarg
6 Replies
7. Shell Programming and Scripting
looking for a bit of help with sed.
I have a file that looks a bit like this:
sdfghhjk
asdfdfghgj
asdfhgghj
werdfvtfh
edftbgh
1211211221
sdffgfm
dfghnhjm
dfvfsgbgh
adsfv bdhgn
1111111dffg
dfv1122
dsgvbghn111111
fffffffgbdghn
fffffff
sfgh3333gs vdf (5 Replies)
Discussion started by: robsonde
5 Replies
8. Shell Programming and Scripting
Hi,
in my korn shell I have this code:
typeset -uL1 rc
read rc?"Insert Y=Yes (default) or N=No >>"
If I press enter without value I wish to set rc=Y. This is my default.
This test: if ] then .... Do not work.
I hope in your help. Thanks in advance.
Regards,
Giovanni (3 Replies)
Discussion started by: gio123bg
3 Replies
9. UNIX for Dummies Questions & Answers
Is there a way to pull out a character at a time from a work in unix, using a shell script? (1 Reply)
Discussion started by: Rukshan
1 Replies