Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to submit several commands together Post 302617489 by forevertl on Monday 2nd of April 2012 05:52:19 PM
Old 04-02-2012
how to submit several commands together

Dear all,

I have a simple question. I have many cut commands like below to run. I am wondering how to just type and submit all the commands at once and then each of the command will be run automaticaly one by one. Thanks a lot!

Code:
cut -d ' ' -f  3-2002          chr20_step2.mlprob>chr20_part1.mlprob   
cut -d ' ' -f  2003-4002  chr20_step2.mlprob>chr20_part2.mlprob  
cut -d ' ' -f  4003-6002  chr20_step2.mlprob>chr20_part3.mlprob   
cut -d ' ' -f  6003-8002  chr20_step2.mlprob>chr20_part4.mlprob   
cut -d ' ' -f  8003-10002  chr20_step2.mlprob>chr20_part5.mlprob   
cut -d ' ' -f  10003-12002  chr20_step2.mlprob>chr20_part6.mlprob   
cut -d ' ' -f  12003-14002  chr20_step2.mlprob>chr20_part7.mlprob   
cut -d ' ' -f  14003-16002  chr20_step2.mlprob>chr20_part8.mlprob   
cut -d ' ' -f  16003-18002  chr20_step2.mlprob>chr20_part9.mlprob   
cut -d ' ' -f  18003-20002  chr20_step2.mlprob>chr20_part10.mlprob   
cut -d ' ' -f  20003-22002  chr20_step2.mlprob>chr20_part11.mlprob   
cut -d ' ' -f  22003-24002  chr20_step2.mlprob>chr20_part12.mlprob   
cut -d ' ' -f  24003-26002  chr20_step2.mlprob>chr20_part13.mlprob   
cut -d ' ' -f  26003-28002  chr20_step2.mlprob>chr20_part14.mlprob   
cut -d ' ' -f  28003-30002  chr20_step2.mlprob>chr20_part15.mlprob   
cut -d ' ' -f  30003-32002  chr20_step2.mlprob>chr20_part16.mlprob   
cut -d ' ' -f  32003-34002  chr20_step2.mlprob>chr20_part17.mlprob   
cut -d ' ' -f  34003-36002  chr20_step2.mlprob>chr20_part18.mlprob   
cut -d ' ' -f  36003-38002  chr20_step2.mlprob>chr20_part19.mlprob   
cut -d ' ' -f  38003-40002  chr20_step2.mlprob>chr20_part20.mlprob   
cut -d ' ' -f  40003-42002  chr20_step2.mlprob>chr20_part21.mlprob   
cut -d ' ' -f  42003-44002  chr20_step2.mlprob>chr20_part22.mlprob   
cut -d ' ' -f  44003-46002  chr20_step2.mlprob>chr20_part23.mlprob   
cut -d ' ' -f  46003-48002  chr20_step2.mlprob>chr20_part24.mlprob   
cut -d ' ' -f  48003-50002  chr20_step2.mlprob>chr20_part25.mlprob   
cut -d ' ' -f  50003-52002  chr20_step2.mlprob>chr20_part26.mlprob   
cut -d ' ' -f  52003-54002  chr20_step2.mlprob>chr20_part27.mlprob   
cut -d ' ' -f  54003-56002  chr20_step2.mlprob>chr20_part28.mlprob   
cut -d ' ' -f  56003-58002  chr20_step2.mlprob>chr20_part29.mlprob   
cut -d ' ' -f  58003-60002  chr20_step2.mlprob>chr20_part30.mlprob   
cut -d ' ' -f  60003-62002  chr20_step2.mlprob>chr20_part31.mlprob   
cut -d ' ' -f  62003-64002  chr20_step2.mlprob>chr20_part32.mlprob   
cut -d ' ' -f  64003-66002  chr20_step2.mlprob>chr20_part33.mlprob   
cut -d ' ' -f  66003-68002  chr20_step2.mlprob>chr20_part34.mlprob   
cut -d ' ' -f  68003-70002  chr20_step2.mlprob>chr20_part35.mlprob   
cut -d ' ' -f  70003-72002  chr20_step2.mlprob>chr20_part36.mlprob   
cut -d ' ' -f  72003-72518  chr20_step2.mlprob>chr20_part37.mlprob


Last edited by methyl; 04-02-2012 at 07:46 PM.. Reason: please use code tags
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to submit cron jobs?

How can I write a script to submit a perl script as a cron job but only have it execute once? After it has executed once, I would like it to automatically insert itself again into cron. I want to avoid the situation where I schedule a cron job to run once a day, but end up with multiple... (4 Replies)
Discussion started by: siegfried
4 Replies

2. Shell Programming and Scripting

Cannot submit a background job

Hi all, I am currently facing a problem when i am submitting a script to run in the background to collect statistics round the clock on an AIX box. I don't have root authority nor can I set it in cron. So when i submit the job, it runs fine, but won't let me signoff. It prompts me that... (2 Replies)
Discussion started by: tansha
2 Replies

3. Forum Support Area for Unregistered Users & Account Problems

cant submit anything

hello admins, i dont use unix.com very often - but when i do have questions, i submit them at the site - but now I cannot submit anything in any forum on the site. The is the only forum i could add a new thread. its tells me that my account could be de-righted, or that im tring to submit... (1 Reply)
Discussion started by: congo
1 Replies

4. Shell Programming and Scripting

PHP Help with Form Submit

Hi, I have a custom HTML form that has a couple radio buttons and a text field that requires a number. I'm not a php programmer and could use some help with putting together php code to calculate a total based on the radio button selection and the text field number. ... (3 Replies)
Discussion started by: nck
3 Replies

5. News, Links, Events and Announcements

where to submit my work?

Hello sir, I worked out some features using java,shell programming and modified the bash shell. We have come up with 13 new features. I want to know where should I submit my work so that it would be of some use to the open source professionals :confused: (1 Reply)
Discussion started by: nsharath
1 Replies

6. Ubuntu

Submit using curl

I'm trying to upload a file to a page using curl and after uploading that file i want to store the redirecting page so i can download the results. I'm using the command: curl "http://apps.gdgps.net/kag_upload.php?kag_type=static&kag_frequency=dual&kag_latency=accurate&... (8 Replies)
Discussion started by: limadario
8 Replies

7. Post Here to Contact Site Administrators and Moderators

Where to submit my scripts

have a doubt. Where I can submit shell scripts done by me ? (5 Replies)
Discussion started by: linuxadmin
5 Replies

8. Shell Programming and Scripting

Can't submit a form.

hello my script is submitting POST-data to a site (its not my first script, i've done these before many times (include parsing scripts) but this one is tough) so the problem is i'm submitting a form with firefox and in firebug i see WHAT exactly i'm submitting then when i do EXACTLY the... (28 Replies)
Discussion started by: tip78
28 Replies

9. Shell Programming and Scripting

SGE submit script

Hi, I'm trying to edit my working bash script to an SGE script in order to submit it as a job to the cluster. Currently I have: #!/bin/bash # Perform fastqc on files in a specified directory. for ((j=1; j <=17; j++)) do directory=/data4/una/batch"$j"/ ... (0 Replies)
Discussion started by: una1992
0 Replies
CUT(1)							    BSD General Commands Manual 						    CUT(1)

NAME
cut -- cut out selected portions of each line of a file SYNOPSIS
cut -b list [-n] [file ...] cut -c list [file ...] cut -f list [-d delim] [-s] [file ...] DESCRIPTION
The cut utility cuts out selected portions of each line (as specified by list) from each file and writes them to the standard output. If no file arguments are specified, or a file argument is a single dash ('-'), cut reads from the standard input. The items specified by list can be in terms of column position or in terms of fields delimited by a special character. Column numbering starts from 1. The list option argument is a comma or whitespace separated set of numbers and/or number ranges. Number ranges consist of a number, a dash ('-'), and a second number and select the fields or columns from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all fields or columns from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all fields or columns from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. If a field or column is specified multiple times, it will appear only once in the output. It is not an error to select fields or columns not present in the input line. The options are as follows: -b list The list specifies byte positions. -c list The list specifies character positions. -d delim Use delim as the field delimiter character instead of the tab character. -f list The list specifies fields, separated in the input by the field delimiter character (see the -d option.) Output fields are separated by a single occurrence of the field delimiter character. -n Do not split multi-byte characters. Characters will only be output if at least one byte is selected, and, after a prefix of zero or more unselected bytes, the rest of the bytes that form the character are selected. -s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. ENVIRONMENT
The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of cut as described in environ(7). EXIT STATUS
The cut utility exits 0 on success, and >0 if an error occurs. EXAMPLES
Extract users' login names and shells from the system passwd(5) file as ``name:shell'' pairs: cut -d : -f 1,7 /etc/passwd Show the names and login times of the currently logged in users: who | cut -c 1-16,26-38 SEE ALSO
colrm(1), paste(1) STANDARDS
The cut utility conforms to IEEE Std 1003.2-1992 (``POSIX.2''). HISTORY
A cut command appeared in AT&T System III UNIX. BSD
December 21, 2006 BSD
All times are GMT -4. The time now is 07:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy