Search Results

Search: Posts Made By: sboxtops
2,642
Posted By sboxtops
syntax for IF test or AWK for octal
Using korn shell. I am reading a file line by line. If a record has a carriage return (octal 015) then I append the second record to the first record. Not all records have a carriage return. I have...
1,845
Posted By sboxtops
special characters in IF TEST
I'm using Korn shell. I'm doing an IF TEST for lots of characters and don't know how to also check for single quote and parentheses and slash. I'm reading a file and some records have garbage...
12,444
Posted By sboxtops
I found it - at the command line when I type in...
I found it - at the command line when I type in the full path of the shell script the $0 will be the full path with filename. Before at the command line I was in the directory and just typing the...
12,444
Posted By sboxtops
The whence didn't help either. unix script: ...
The whence didn't help either.
unix script:
#!/bin/ksh

echo zero: $0

dir1=`dirname $0`
echo dir1: $dir1

program=$(whence $(dirname ${0}))
echo $program

output:
zero: dirname_test1.sh...
12,444
Posted By sboxtops
$0 doesn't have full directory path
I'm running AIX unix korn shell. If I echo $0, I only get the filename, it does not have the directory name also. So when I do: `dirname $0` it returns a . (meaning current directory). How get $0 to...
6,647
Posted By sboxtops
hp-unix stat command to get last change date of file
I'm on hp-unix. I would like a variable to hold the last change date of a file. I looked at the man pages for stat, but I don't see any examples and can't get the syntax right. Can anyone help me?...
2,373
Posted By sboxtops
Search flat file in specific byte
I am on AIX Unix. I want to read a flat file for a string in a certain byte. I want to find the value: 943034 in column 56; and write out just those records to another file. Also, could I get the...
4,495
Posted By sboxtops
Thank you for your replies. I could not get them...
Thank you for your replies. I could not get them to work correctly. I found another post that worked:
cnt=`expr length $xxx`
4,495
Posted By sboxtops
find length of a parameter
I want to check the length of a parameter passed to the korn shell. I've tested:

xxx=hello
echo $xxx
cnt=`echo $xxx |wc -c`
echo "cnt $cnt"

(xxx will be the parm). $cnt is 6, it should be...
Forum: AIX 09-02-2008
23,097
Posted By sboxtops
Thank you
Thank you
Forum: AIX 09-02-2008
23,097
Posted By sboxtops
rerun .profile after changing variable
I changed a $variable in my .profile (AIX unix). I know I could exit out and logon onto unix again, but how do I rerun the .profile at the command line?
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy