10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to change "F" to "G" in lines after the first one:
'FUE.SER' 5
1 1 F0501 F0401 F0502
2 1 F0301 E0501 F0201 E0502 F0302
3 1 F0503 E0503 E0301 E0201 E0302 E0504 F0504
4 1 F0402 F0202 E0202 F0101 E0203 F0203 F0403
5 1 F0505 E0505 E0303 E0204 E0304 E0506... (10 Replies)
Discussion started by: larrl
10 Replies
2. Shell Programming and Scripting
Given a range of IPs similar to this:
"212.63.183.19","212.63.183.19","3560945427","3560945427","CN","China"
"217.7.143.0","217.7.143.0","3641151232","3641151232","CN","China"
"218.0.0.0","218.31.255.255","3657433088","3659530239","CN","China"... (13 Replies)
Discussion started by: SkySmart
13 Replies
3. Shell Programming and Scripting
Hi,
I have a file abc.txt as
ABC,TYU,1.2566
AHG,GJJ,1.898
hgh,FGA,1.854
My program is reading each line and storing the values variables base_cy, quo_cy, ra_amt
Need to validate each of them as in:
base_cy and quo_cy should be a 3 character alphabet among A-Z, if it is lower case ... (1 Reply)
Discussion started by: infyanurag
1 Replies
4. Shell Programming and Scripting
Hi;
For sure there's an easy answer to this one that I am not finding..
I first set a variable, say
b1a:] max=5
then I want to use max to set the range for a for loop like so (it should run for i in 1:5)
b1a:] for i in {1..$max}; do echo $i; done
{1..5}
I would like the output... (2 Replies)
Discussion started by: jbr950
2 Replies
5. UNIX for Dummies Questions & Answers
This is what I have just entered and received in return:
# echo $LANG
LANG: Undefined variable.
How can this be? I was expecting something like en_US.utf8. Am using FreeBSD 8.2. (2 Replies)
Discussion started by: figaro
2 Replies
6. Shell Programming and Scripting
hi all,
i have a shell (ksh) script where i am reading line by line from a grep command and i wanted to check if the grep command actually returned something or was null. i can do this by using -z :
if ; then .....
but this forces me to do something when $myVariable is null when i... (3 Replies)
Discussion started by: cesarNZ
3 Replies
7. Shell Programming and Scripting
Hi. I have a file with asterisk field separators and backslash line terminators. The first field in each line names the line type. I am trying to process each range separately. Here's what the data looks like:
BA*DATA\
LS*DATA1*DATA2*00020*\
TA*DATA1*DATA2*DATA3*\
TA*DATA1*DATA2*DATA3*\... (1 Reply)
Discussion started by: yoi2hot4ya
1 Replies
8. Shell Programming and Scripting
Does anyone know the quick way to check if the variable contains only numeric characters, for example:
A=123445 - correct
B=#f123* - incorrect
I am in ksh88i Thanks a lot for help -A (1 Reply)
Discussion started by: aoussenko
1 Replies
9. UNIX for Dummies Questions & Answers
How could I check if a numeric variable has 5 digits in KSH...I have a zipcode variable that I know will always be 5 digits, and I want to print out an error if it is less or more than 5 digits the problem is that I have it as:
if ]
but this won't work because the statement doesn't see 0001 as... (3 Replies)
Discussion started by: developncode
3 Replies
10. Shell Programming and Scripting
RH Linux, $SHELL=/bin/ksh
I have a .profile which I source in as such --> . .profile
Whats happening is the variables are getting validated and generating errors.
for example
.profile
export foo=/to/the/moon
when I . .profile , I get
: not foundmyusername/.profile
or bad... (8 Replies)
Discussion started by: BMetelsky
8 Replies