15 Topics
|
|
Hi, i want to delete a column from a file. the file is like : 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 if i want to remove any column the outout should be like ( suppose 4): 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 i have used swk command, but its not … |
|
Hello everyone, I am trying to merge large number of CSV files into one, using the following "awk" command, but if I increase the number of files more than 10,000, it then gives me "argument too long" error. Can someone suggest how I can manage to go beyond the limit? … |
|
I am defining the following variables inside a bash script (note: I ultimately want to pass these values to the bash script from the commandline but I haven't gotten that far yet): OFS=',' INPUTFILE='~/data.txt' OUTPUTFILE='~/delimited.txt' FIELDWIDTHS='1 10 4 2 2' Next, inside the bash script I'm attempting to call an … |
|
hello, I created a awk program to work witha data file to output a table and subtotal the rows and total up the collums and average I got it to work but when i added a presentation header before my totals go away. working code so far ------ can be … |
|
BEGIN { via["AIRTEL_WHITE"] = 0 via["AIRTEL_WAP"] = 0 via["_321_44"] = 0 via["_321_555"] = 0 count=0 } { for(var in via) { if($5 ~ /var/) { count++ via[var] = via[var]++; } #print $5 } } END{ for(var in via) { if(via[var] != 0) { print var "->" via[var] } } print … |
|
For a shell script used to automatically generate c++ code files, I have to split certain names apart for them to be formatted. I split them at a capital letter, but I do not want to split if there are multiple capital letters in sequence. For example: I want this … |
|
I am using Awk inside a bash shell script to search header files for c++ functions so I can add these functions to another file. All of the functions I need will have form: type getName() or type setName(type value) Right now I get all the functions listed in between … |
|
CONFIG_FILE="${HOME}/sample/seq.cfg" count=`awk 'END {print NR}' $CONFIG_FILE` echo $count t=1 while [ "$t" -le "$count" ] do output_var=`awk -v v1=$t '$1 ~ /v1/ { print $1 }' $CONFIG_FILE` input_var=`awk -v v1=$t '$1 ~ /v1/ { print $3 }' $CONFIG_FILE` echo "O=" $output_var echo "I=" $input_var done the above code is giving … |
|
Been a long time since I've logged in and had a question, but here goes nothing! I have a file that is not delimited in any way, but I need to replace a particular column character from a space to a alphanumeric value on every other line starting at line … |
|
Hi Everyone, I need a replace a string (ex : this) with the string (ex : that) in each line of a file (sample.txt) using a C Shell Script and I am not allowed to use sed,awk and replace command in the unix , So i tried to use tr … |
|
This is homework. I have to write a bash shell script using awk to process three delimited text files and produce a formatted report. The three files are as follows: [CODE]GRADES file John Bunyan:90:100:75:60 Maria Montessori:80:90:60:82 Alice Cooper:75:80:54:47 Harvey Mudd:89:45:89:95 PROJECTS file test1:30 test2:30 paper2:20 exam:50 LEVELS file A:89.5 B:79.5 … |
|
consider a list of files in a particular directory(LIST A) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 clsa_Upd 38912000 Sep 14 19:12 cs_chgpp and in another directory (LIST B) 58623208 Sep 14 20:08 blbn_blfbe_drv 57904920 Sep 14 19:54 blbn_cycmn 55814208 Sep 14 06:02 … |
|
I need to sum up the values of 3rd column and 4th coulmn based on the following conditions 1) If the 1st column (i.e ctpy) of the record matches with any other record && first two character of the 2nd column (ety), matches with first two character matches the 2nd … |
|
After running the command [CODE] find . -name "R*VER" -mtime +1 -exec sh -c 'grep -H ^err "{}" || echo "{}:No error"' \;[/CODE] my files look like this [CODE] RRR1~COS~COSMETICS~40048~jgmdtv113~1~P~R22-200~029053662549~20110607~102151.VER No error RRR1~COS~COSMETICS~ETT03~jgm14652.~3~F~R16-500~000907009757~20110607~085109.VER err 3922 [/CODE] Using the tilde (~) symbol as delimiter in the file name, can I extract … |
|
Helo all, I wanted to parse EMBL format like file to fasta. i cannot use bioperl because this is not complete EMBL format. so please suggest me how to get this done.. [CODE] ID 013789-0068 PS TBD OO huringiensis OS ringiensis OX SI 68 RA RL 2010. OKAYAMA UNIVERSITY,JAPAN LAMB … |
The End.