09-23-2005
multiple cuts syntax problem
Hi All,
I need some help with multiple cut and paste, at the moment I have a shell script that uses the following cuts ( this is just some)
cut -c1-92 WAITING > col1 .....etc etc etc
cut -c93-98 WAITING > col17 # blank_spaces
cut -c99-104 WAITING > col18 # Date
cut -c105 WAITING > col19 # Canceled
cut -c106-109 WAITING > col20 # ????
cut -c111-116 WAITING > col21 # Date
cp col12 col12a
sed -e s/0/"No ASC"/ -e s/2/ASC/ col12a > col1
2bb
awk '{print NF ? $0 : blankrow}' blankrow="No ASC" col12bb > col12a
paste col[1-3] col3a col4 col4a col5 col6a col[7-9] col9a > test1
paste col1[0-1] col12a col12 col1[3-9]> test2
paste col2[0-1] T_formula > test3
paste test* > joined
etc Etc!
but it is too long winded unforunately though this is the only way I know, does anyone know of a quicker way to do this as it takes a very long time to run ...after doing all the cutting it pastes everything back into a newfile called "joined", but it just seems like a hassle and I thought someone out there must know of a better way to achieve the same results(bearing in mind it does some awking and find and replacing into the bargain
thanks in advance
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
dear friends,
I have a large size file containg two fields data
like this
*** ****
122 222
***** *****
***** *****
232 233
i have file like this.
i want to remove blank lines from file .
i think awk is servive this problem
i wrote a awk command but the error is... (3 Replies)
Discussion started by: rajan_ka1
3 Replies
2. Shell Programming and Scripting
Dear friends,
I am writing shell script in csh .
i want to make arthimatic operation in csh.
i wrote sysntax like this.
set val = 230
set tmp = `0.1 * $val + 300`
echo $tmp
but it is not working .
anyone please give me syntax. (3 Replies)
Discussion started by: rajan_ka1
3 Replies
3. Solaris
Hello,
I had created a shortcut to open up a gnome-terminal by pressing <Alt>m. This worked fine, until I logged out and logged back in. gnome-terminal no longer opens. However, the process is created, as evidenced by the gnome-terminal showing up on my process list.
I've created and deleted... (1 Reply)
Discussion started by: cooldude
1 Replies
4. Shell Programming and Scripting
I am trying to write a script that will do a sql statement. But in the sql I will have a list (1,2,3,4).
How would I go about asking for the input from the user running the script, and then transferring that back into the list as say ($var1,$var2,$var3)?
It would be somewhat like this:
... (1 Reply)
Discussion started by: Captain
1 Replies
5. Shell Programming and Scripting
Hi guys, hopefully this hasn't been asked before - couldn't see the question anywhere.
I have a large number of timestamps (hh-mm-ss-millisecond)
that I need to find the difference between e.g.:
14-11-07-513
14-11-07-644
Now the script that I have just knocked up is horrifically slow,... (4 Replies)
Discussion started by: dlam
4 Replies
6. Shell Programming and Scripting
I can't seem to get this to work.
I can reformat the date field if it's the first field (and only field) in the file:
However, I get a syntax error when the date field is the second field (or has any other columns following):
I can use a ";" but then it puts each column on separate... (8 Replies)
Discussion started by: giannicello
8 Replies
7. Shell Programming and Scripting
I'm calling the following if-else from nawk. But I keep getting an error at the "else". I've tried putting more brackets and ; but still I get complaints about the "else".
Any ideas ?
Thanks,
wbrunc
BEGIN { FS = "," ; OFS = "," }
{ if ( $8 ~ /A/ && $9 == B )
$1="4/29/2013" ;
$2="J.Doe"... (2 Replies)
Discussion started by: wbrunc
2 Replies
8. Shell Programming and Scripting
I wasn't sure if this should go in the networking board or not, since I am trying to log into routers, however I don't think my script issues have anything to do with the routers themselves....
I am trying to write a script that will log into various routers we have on the network and determine... (2 Replies)
Discussion started by: ippy98
2 Replies
9. AIX
Hey Guy's,
Is there a limit on the number of forwards that can be used or the syntax and spaces?
I noticed I have to put spaces between ; and the IP for at least the first one, then space at the end to work and the rest don't work at all no matter what I try.
forward first;
... (1 Reply)
Discussion started by: Devyn
1 Replies
LEARN ABOUT DEBIAN
symphony
SYMPHONY(1) General Commands Manual SYMPHONY(1)
NAME
symphony - mixed-integer linear program (MILP) solver
SYNOPSIS
symphony [ -hagrtbd ] [ -u ub ] [ -p procs ] [ -n rule ] [ -v level ] [ -s cands ] [ -c rule ] [ -k rule ] [ -m max ] [ -l pools ] [ -i
iters ] [ -f parameter_file_name ] [-j 0/1] [-o tree_out_file]
DESCRIPTION
This manual page briefly documents the symphony command.
symphony is a generic MILP solver that can be invoked from the command line (through an interactive shell or in a batch mode), or by link-
ing to the provided callable library. When no options are given symphony enters the interactive shell mode. Otherwise the program enters
the batch mode, for which a summary of options is included below.
OPTIONS
At a minimum, one must specify the name of the file to be read and solved.
-h help
-a no cut timeout
-d enable graph drawing
-g use cut generator
-r do repricing in root
-t trim the tree
-b don't perform branch and cut
-u ub use upper bound 'ub'
-p procs
allow 'procs' active nodes
-n i use node selection rule 'i'
-v i set verbosity to level 'i'
-s cands
use 'cands' candidates for strong branching
-k i use rule 'i' to select child
-m n allow a max of 'n' cuts to enter per iteration
-e n allow a max of 'n' cut pools
-l n k load balance level 'n' and iterations 'k'
-i n allow a max of 'n' iterations in presolve
-f file
read parameters from parameter file 'file'
-j 0/1 whether or not to generate cgl cuts
-z n set diving threshold to 'n'
-o file
output vbc-like tree information to file 'file'
Solver-specific switches:
symphony [ -H ] [ -FL file ]
-H help (solver-specific switches)
-F model
model should be read in from file 'model' (MPS format is assumed unless -D is also present)
-L model
LP format model should be read in from file 'model'
-D data
model is in AMPL format and data is in file 'data'
SEE ALSO
For a complete description, see
/usr/share/doc/coinor-libsymphony-doc/user-guide.pdf.gz
in the coinor-libsymphony-doc package.
AUTHOR
symphony was written by Ted Ralphs et.al.
This manual page was written by Aramian Wasielak <aramian.wasielak@gmail.com>, based on "symphony -h" and clp.1, for the Debian project
(but may be used by others).
Jan 21, 2010 SYMPHONY(1)