03-16-2002
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'd like to access a windows directory from aix with samba client.
To allow direct access (not interactive), i'm using EOF like:
smbclient \\\\winserver\\windir 'passwd' -U usersmb << EOF
cd subwindir
put myfile
EOF
The access is correct but does somebody know how to trap errors... (1 Reply)
Discussion started by: jo_aze
1 Replies
2. UNIX for Dummies Questions & Answers
hello all,
how end of a file is detected in UNIX system?
does it make use of any special symbols to identify the EOF? :(
thank you all (5 Replies)
Discussion started by: compbug
5 Replies
3. UNIX for Dummies Questions & Answers
I have written this code:
code
echo 'Now choose the file or files you want to merge your input with: \c'
read filenames
filelist=""
for file in $filenames; do
filelist="$filelist $file"
done
echo "Now that you've chosen these files ($filelist), please start typing: "
until ; do
paste -... (2 Replies)
Discussion started by: fiol73
2 Replies
4. Shell Programming and Scripting
hi,
in a shell script i came accross the following bit of code
1.shift $(($OPTIND - 1))
2.if ; then
3. cat << EOF >&2
4.Usage: $0 lockfilename
5.EOF
6. exit 1
7.fi
I am not able to understand the meaning of lines(1,3,5).
Can any one of u tell me the purpose of above said lines.... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies
5. Shell Programming and Scripting
I'm trying to connect to oracle with the following code in the script:
checksqlerror{
if
echo $1
exit
fi
}
$SQLPLUS username/password@schemaname
checksqlerror "failed to connect to oracle"
If I'm passing wrong schema name,instead of executing checksqlerror it stops and expects user... (2 Replies)
Discussion started by: BhawanaAggarwal
2 Replies
6. Programming
How can I write EOF into a file?
I tryed to do as follows:
size=sizeof(EOF);
end_of_file=EOF;
write(fdMutexRichieste, &end_of_file, size);
But it does non work correctly,
becouse in the next cicle (using lseek(..., SEEK_END) of my code it seems to ignore my EOF and use the LAST... (5 Replies)
Discussion started by: DNAx86
5 Replies
7. Shell Programming and Scripting
Hey!
Can I write a routine that allows me to in a txt file check line by line until the end of file?
something like
until do
---some code---
done
maybe it is a stupid question but I never learned shell scripts and I need this :p
thanks in advance (1 Reply)
Discussion started by: ruben.rodrigues
1 Replies
8. Shell Programming and Scripting
Hi gurus,
I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies
9. Shell Programming and Scripting
Hi friends ,
I am confused with << EOF
EOF
Most of the cases I found
sqlplus $db_conn_str << EOF
some sql staments
EOF
another exapmle is
#!/bin/sh
echo -n 'what is the value? '
read value
sed 's/XXX/'$value'/' <<EOF
The value is XXX
EOF (1 Reply)
Discussion started by: imipsita.rath
1 Replies
10. Shell Programming and Scripting
Hi All,
I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting?
Thanks in Advance (2 Replies)
Discussion started by: HemaV
2 Replies
ASCII(1) General Commands Manual ASCII(1)
NAME
ascii, unicode - interpret ASCII, Unicode characters
SYNOPSIS
ascii [ -8 ] [ -oxdbn ] [ -nct ] [ text ]
unicode [ -nt ] hexmin-hexmax
unicode [ -t ] hex [ ... ]
unicode [ -n ] characters
look hex /lib/unicode
DESCRIPTION
Ascii prints the ASCII values corresponding to characters and vice versa; under the -8 option, the ISO Latin-1 extensions (codes 0200-0377)
are included. The values are interpreted in a settable numeric base; -o specifies octal, -d decimal, -x hexadecimal (the default), and -bn
base n.
With no arguments, ascii prints a table of the character set in the specified base. Characters of text are converted to their ASCII val-
ues, one per line. If, however, the first text argument is a valid number in the specified base, conversion goes the opposite way. Control
characters are printed as two- or three-character mnemonics. Other options are:
-n Force numeric output.
-c Force character output.
-t Convert from numbers to running text; do not interpret control characters or insert newlines.
Unicode is similar; it converts between UTF and character values from the Unicode Standard (see utf(6)). If given a range of hexadecimal
numbers, unicode prints a table of the specified Unicode characters -- their values and UTF representations. Otherwise it translates from
UTF to numeric value or vice versa, depending on the appearance of the supplied text; the -n option forces numeric output to avoid ambigu-
ity with numeric characters. If converting to UTF , the characters are printed one per line unless the -t flag is set, in which case the
output is a single string containing only the specified characters. Unlike ascii, unicode treats no characters specially.
The output of ascii and unicode may be unhelpful if the characters printed are not available in the current font.
The file /lib/unicode contains a table of characters and descriptions, sorted in hexadecimal order, suitable for look(1) on the lower case
hex values of characters.
EXAMPLES
ascii -d
Print the ASCII table base 10.
unicode p
Print the hex value of `p'.
unicode 2200-22f1
Print a table of miscellaneous mathematical symbols.
look 039 /lib/unicode
See the start of the Greek alphabet's encoding in the Unicode Standard.
FILES
/lib/unicode
table of characters and descriptions.
SOURCE
/sys/src/cmd/ascii.c
/sys/src/cmd/unicode.c
SEE ALSO
look(1) tcs(1), utf(6), font(6),
ASCII(1)