Hi,
I wonder if any body can help me with a simple data manipulation problem. I am using Korn shell on AIX and need to select the first section of a variable name, keeping everything before the first '.' and dumping everything afterwards. As an example I would want the following script (with the blank filled in):
#!/bin/ksh
x="aaa.bbb.ccc.com"
y=#######unknown (sed?) statement#######
echo output: $y
To produce the following results:
output: aaa
I'm sure this is simple, but I just can't get any joy.
Cheers,
Mark T.
I wonder if any body can help me with a simple data manipulation problem. I am using Korn shell on AIX and need to select the first section of a variable name, keeping everything before the first '.' and dumping everything afterwards. As an example I would want the following script (with the blank filled in):
#!/bin/ksh
x="aaa.bbb.ccc.com"
y=#######unknown (sed?) statement#######
echo output: $y
To produce the following results:
output: aaa
I'm sure this is simple, but I just can't get any joy.
Cheers,
Mark T.