09-28-2001
Cut
Sorry, I accidentally posted this in the advance forum first...
Hi, I'd like to use cut to remove the last field from a record
the original record is comma delimited with null as the 19th field. Example: field18,,field20
if I use
cut -d, -f1-19 file
the record ends with
field18,
but I'd like field19 to be shown also, like
field18,,
is there something I am missing, or should I just append a comma to the end of the record after removing field20 (the last field)
Thanks in advance,
kristy
3 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
2. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
3. Shell Programming and Scripting
I am using : << cut / cut to comment out block of code.
Works fine on few lines of script, then it gives me this cryptic error when I try to comment out about 80 lines.
The "warning " is at last line of script.
done < results
169 echo "END read all positioning parameters"
170... (8 Replies)
Discussion started by: annacreek
8 Replies
LEARN ABOUT DEBIAN
px_get_data_short
PX_GET_DATA_SHORT(3) Library Functions Manual PX_GET_DATA_SHORT(3)
NAME
PX_get_data_short -- Get value from short data field
SYNOPSIS
#include <paradox.h>
int PX_get_data_short(pxdoc_t *pxdoc, char *data, int len, short int *value)
DESCRIPTION
Converts a data field as it stored in the database file into a short integer for the host architecture. You should use this function
instead of accessing the data directly.
data points to the start of the data field in the record. It must be calculated by summing up all field length before the field to operate
on and add it to the base pointer of the record.
Note:
This function is deprecated and obsolete if PX_retrieve_record(3) is used.
RETURN VALUE
Returns 0 if the value is NULL, -1 in case of an error and 1 otherwise.
SEE ALSO
PX_get_data_byte(3), PX_get_data_long(3), PX_get_data_double(3), PX_get_data_alpha(3)
AUTHOR
This manual page was written by Uwe Steinmann uwe@steinmann.cx.
PX_GET_DATA_SHORT(3)