10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file name :
var=UsrAccChgRpt
I want to make them upper case.
Tried:
$var | tr
Error:
tr: Invalid combination of options and Strings.
Usage: tr | -ds | -s | -ds | -s ] String1 String2
tr { -d | -s | -d | -s } String1
Could you please help. I am using AIX... (2 Replies)
Discussion started by: digioleg54
2 Replies
2. Shell Programming and Scripting
Hello, I have a file containing different words. How can i print the words which contain at least one small letter, for example if i have:
today TOMORROw 12345 123a
next preViou5 no
it should print the following:
today TOMORROw 123a
next preViou5 no
Please use code tags as required... (5 Replies)
Discussion started by: JhonTheNewbie
5 Replies
3. UNIX for Beginners Questions & Answers
I know that I can use wild cards:ls ???????to list files 7 characters long, but how do i omit the .?! and spaces?
Please use CODE tags when displaying sample input, sample output, and code segments. (2 Replies)
Discussion started by: hiya54
2 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: grep_me
5 Replies
5. Shell Programming and Scripting
Hi everyone. I need to change a script (ksh) so that it will grep on the 1st 2 letters in the second column of a 5 column file such as this one:
192.168.1.1 CAXY0_123 10ABFL000001 # Comment
192.168.1.2 CAYZ0_123 10ABTX000002 # Comment
192.168.2.1 FLXY0_123 11ABCA000001 ... (4 Replies)
Discussion started by: TheNovice
4 Replies
6. Shell Programming and Scripting
I am making a word game and I am wondering how to find and arrange words in a list that have the same letters. In my game, you are presented with 5 letters, and you then have to rearrange the letters tp make a word. So the word could be "acorn", but those 5 letters could also make up "narco" or... (2 Replies)
Discussion started by: hellobard
2 Replies
7. Shell Programming and Scripting
Hello Guys,
I am writing a script which check each line for how many Uppercase and Lowercase letter of a given file. Please check my script as follow:
l=0
while read line
do
echo Line `expr $l + 1` has ` tr -cd "" < $line | wc -c` uppercase letters and
`tr -cd "" < $line | wc -c`... (3 Replies)
Discussion started by: kasparov
3 Replies
8. Shell Programming and Scripting
Hi guys.
I have file named output.txt containing file names. one per line. I use this command to convert all characters to capital letters and write to the same file.
cat output.txt | tr 'a-z' 'A-Z' > output.txtBut at the end output.txt is emtpy. Could anyone help?? (6 Replies)
Discussion started by: majid.merkava
6 Replies
9. UNIX for Dummies Questions & Answers
Looking how to find only three or four letter strings using grep in a file called hello:
file contains:
TIT
TAT
RATA
ERAT
RATE
HI
RE
CA
PA
CHANGE
SANDY
ANSWER
I am using the code: (4 Replies)
Discussion started by: auerbeck.tyler
4 Replies
10. UNIX for Advanced & Expert Users
okay, I need some help! Im trying to write a script where it looks in the file you designate, pulls apart all the words so i can count how many of each letter there is in the file, then i need to put them in the order of the most occuring letter to the least. This most likley will need a loop... (3 Replies)
Discussion started by: chekeitout
3 Replies