11-11-2008
Here is another way
x=`echo $VAR | awk '{print $1}'`
y=`echo $VAR | awk '{print $2}'`
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to use awk and its split function to get the number of tokens in a string that are seperated by underscores.
ex_alex_is_testing_this_script_ex would return 7. It works when I directly put the string in. However, I can not get it to work when I try to refer to a variable used earlier... (2 Replies)
Discussion started by: rx82000
2 Replies
2. UNIX for Dummies Questions & Answers
I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this.
For example:
split -l 3000000 filename.txt
This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies
3. Shell Programming and Scripting
i have these values inside variable $blah
BUNGA TERATAI 3 5055 ITH 1 0 0 0 1 1
JADE TRADER 143W ITH 4 0 0 0 4 4
MOL SPLENDOR 0307A ITH 3 0 0 0 3 3
so how do I split them into array with the... (4 Replies)
Discussion started by: finalight
4 Replies
4. Shell Programming and Scripting
Hello,
I have a paramter $param consisting just of two literals and want to split it into two parameters, so I can combine it to a new parameter <char1><string><char2>, but the following code didn't work:
tmp_PARAM_1=cut -c1 $PARAM
tmp_PARAM_2=cut -c2 $PARAM... (2 Replies)
Discussion started by: ABE2202
2 Replies
5. Shell Programming and Scripting
Hi
i have a variable $VAR =15 14 13,
i want to split this number and store in 3 variables say
$N1=15
$N2=14
$N3=13
i know its simple but my mind is not giving me answers at this point of time. i will be running the code in Solaris Box..please help (3 Replies)
Discussion started by: Shellslave
3 Replies
6. Shell Programming and Scripting
Dear all,
I have basic knowledge of Unix script and her I am trying to process variable length and variable format CSV file.
The file length will depend on the numbers of Earnings/Deductions/Direct Deposits.
And
The format will depend on whether it is Earnings/Deductions or Direct Deposits... (2 Replies)
Discussion started by: chechun
2 Replies
7. Shell Programming and Scripting
The requirement is, there is a log file which contains a huge data. i need to get a particular field out of it by searching with another field.
ex:
2011-03-28 13:00:07,423 : millis=231 q={ call get_data_account(?,?,?,?,?) }, params=
i need to search for the word "get_data_account" in file... (1 Reply)
Discussion started by: Jassz
1 Replies
8. Shell Programming and Scripting
Hi,
I have the following lines that I would like to see in an array for easy comparisons and printing:
Example 1:
field1,field2,field3,field4,field5
value1,value2,value3,value4,value5Example 2:
field1,field3,field4,field2,field5,field6,field7... (7 Replies)
Discussion started by: ejdv
7 Replies
9. Shell Programming and Scripting
Hello;
I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I need to split a file by number of records and rename each split file with actual filename pre-pended with 3 digit split number.
What I have tried is the below command with 2 digit numeric value
split -l 3 -d abc.txt F (# Will Produce split Files as F00 F01 F02)
How to produce... (19 Replies)
Discussion started by: techedipro
19 Replies
LEARN ABOUT REDHAT
mkoctfile
MKOCTFILE(1) General Commands Manual MKOCTFILE(1)
NAME
mkoctfile - Compile dynamic-load modules for GNU Octave
SYNOPSIS
mkoctfile [-IDIR] [-DDEF] [-lLIB] [-LDIR] [-M|--depend] [-c] [-o FILE|--output FILE] [-p VAR|--print VAR] [-s|--strip] [-v|--ver-
bose] [-h|-?|--help] file ...
DESCRIPTION
mkoctfile is used to compile source C, C++ or Fortran source code in dynamically loadble file for octave(1).
OPTIONS
mkoctfile accepts the following options:
-IDIR Add include directory DIR to compile commands.
-DDEF Add definition DEF to compiler call.
-lLIB Add library LIB to link command.
-LDIR Add library directory DIR to link command.
-M|--depend
Generate dependency files (.d) for C and C++ source files.
-c Compile but do not link.
-o FILE|--output FILE
Output file name; default extension is .oct.
-p VAR|--print VAR
Print configuration variable VAR. Recognized variables are:
CPPFLAGS CPICFLAG
INCFLAGS CXX
F2C CXXFLAGS
F2CFLAGS CXXPICFLAG
F77 XTRA_CFLAGS
FFLAGS XTRA_CXXFLAGS
FPICFLAG SHLEXT
CC SH_LD
CFLAGS SH_LDFLAGS
-s|--strip
Strip the output file.
-v|--verbose
Echo commands as they are executed.
file Compile or linke file. Recognised file types are
.c C source
.cc C++ source
.C C++ source
.cpp C++ source
.f Fortran source
.F Fortran source
.o object file
.SH SEE ALSO
.BR octave (1).
AUTHOR
John W. Eaton <jwe@bevo.che.wisc.edu>
This manual page was contributed by Dirk Eddelbuettel <edd@debian.org> for the Debian GNU/Linux distribution but may be used by others.
GNU Octave 1 November 2002 MKOCTFILE(1)