In a Case switch, how to ignore case sensitive in the test:
e.g.
case "$field" in
"TEST) action1;;
*) action2;;
esac
How to go in action1 in case of $field = TEST , or Test , or test or .... without enumerating all possibilities...
Thanks,... (1 Reply)
Hi Experts team,
i wish to use switch case in unix.
my req is
case $code in
1111)
echo "1111"
1112)
echo "1112"
*)
echo "default"
esac
see eventhough for particular case 1111 , it is always execute the default statement *), if i code like this.
How can handle... (2 Replies)
Hi all,
I have requirement where i need to find a pattern and replace it by new word. I used the below perl command
echo `perl -p -i -e "s/AbCdEf/PqRsTu/g;" FileName.txt`
But I am getting an error as below
Can't do inplace edit Not a Owner
and the file FileName.txt gets ... (9 Replies)
I am new to unix and awk/sed etc... using C-Shell.
Basically, I have a fixed length file that has 4 different record types on it, H, D, V, W all in column 1. I need to change all the W's in column 1 to D's. in the entire file. The W's can be anywhere in the file and must remain in the same... (3 Replies)
HP-UX
I have a fixed length file like this
9921190625797AE2560 20091001US20091001@@NEWSITE @@ 20091013001X X 01NEW00DNA00007081 @@ SPRINGFIELD @@ ... (2 Replies)
Dear All,
I do not have any knowledge of scripting. I want to replace specific lines of a text file with a specific text. Like I have one file which is "original file" and one file "changes file" which has list of lines which I want to replace in original file with a specific string. I want the... (5 Replies)
Need command for position based replace:
I need a command to replace with 0 for characters in the positions 11 to 20 to all the lines starts with 6 in a file.
For example the file ABC.txt has:
abcdefghijklmnopqrstuvwxyz
6abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz... (4 Replies)
I have text with upper and lower case words. I want to find something and replace it with something new. But it should match the case - Meaning - it should replace old upper cased word with NEW upper case word and lower with lower.
example:
this text is very simple TEXT.
now I want to replace... (5 Replies)
Hello Experts,
Any help is appreciated.
I would like to find and replace a string in a specific file ( e.g abc.xml) only for the directories starting with "AB 1.0 DIR".
I've 50 sub directories starting with "AB 1.0 DIR". And I would like find the file abc.xml in those sub-directories and... (4 Replies)