Sponsored Content
Full Discussion: Error removed from file
Top Forums Shell Programming and Scripting Error removed from file Post 302938983 by cmccabe on Friday 20th of March 2015 02:26:00 PM
Old 03-20-2015
The screenshot is also saved as a text file ${id}_name in that same directory If there is an error in the variant $3 of that file will have (variantchecker): and in $1 in that file will match $1 of the ${id}.txt. That is the variant to remove. Is this possible? Thank you Smilie.

Code:
 check() {
    printf "\n\n"
	awk 'NR>1 { if ($2 ~ /^\(/ ) {$1=""; print "Found error: ", $0} else { sub(/.*:/, "", $1); sub(/.*:/, "", $7); print "No error: " $1 "," $7}}' C:/Users/cmccabe/Desktop/Python27/${id}_name.txt
	printf "Is the variant correct?  Y/N "; read match_choice
	
    case "$match_choice" in
        [yY]) id="${id}"; position ;; 
        [nN]) id=""; while read id;do check "$id";done<GJB2.txt; gjb2 ;;  
    esac
}

 

10 More Discussions You Might Find Interesting

1. Solaris

after init all /tmp file has been removed

I'm new in Solaris server After the system support reboot the Solaris server, all the files in /tmp has been removed, is that normal under Solaris or under different init level will get different result? which init level will do that? (5 Replies)
Discussion started by: yesthomas
5 Replies

2. Shell Programming and Scripting

Please Help. Strings in file 1 need to be searched and removed from file 2

Please help. Here is my problem. I have 9000 lines in file a and 500,000 lines in file b. For each line in file a I need to search file b and remove that line. I am currently using the grep -v command and loading the output into a new file. However, because of the size of file b this takes an... (4 Replies)
Discussion started by: mjs3221
4 Replies

3. UNIX for Dummies Questions & Answers

how to removed chr(10) characters in a file

Hi, How do we remove an extra new line in a file. New line in ascii is called chr(10). Suppose we have a file as: 12345 98765 ------ ------ From the above i represented new line with dashed lines. Basically i have 2 new lines with white space at the end of the file. How do i removes... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

4. Linux

file removed

Hi Team, I have deleted a file accidentally by using rm command. I am not the root(admin) user. Can you please let me know how to get that .tex file? (2 Replies)
Discussion started by: darling
2 Replies

5. Red Hat

How to update rpm database regarding removed file of a package?

For Suppose, I have installed a package having files file1, file2 and file3. After installation, I removed the file "file3". But "rpm -qf file3" is giving the package name, even file3 was not there. And also "rpm -ql package" is also displaying all 3 files. How can i update rpm database about... (6 Replies)
Discussion started by: snreddy_gopu
6 Replies

6. Programming

The fwrite function is not returning error, if the file was removed.

The fwrite function call is not returning error, when the file it writes to is removed, please advise on how to find if the file already opened and being written by a program is removed manually or by some other process. please see the code below, #include<stdio.h> #include<stdlib.h> ... (3 Replies)
Discussion started by: Kesavan
3 Replies

7. Solaris

File system full - not removed: No space left on device

Does anyone have any advise on trying to clean up a full filesystem? I can't rm any files because of the follow: not removed: No space left on device Any help would be very much appreciated. (10 Replies)
Discussion started by: craigsky
10 Replies

8. UNIX for Beginners Questions & Answers

File Containing Extra delimiter should be removed

The input file is this: a|b|c|d x|y|z|n||||||||| p|q|r|s||| g|h|i| w|e|r|| Now as per requirement , each row should have only 3 delimiter. Now the 2nd row & last row has an extra delimiter, How to remove that ? In some large file having 100K data , there can be 100 such rows having... (4 Replies)
Discussion started by: ikdKunal
4 Replies

9. UNIX for Beginners Questions & Answers

File Management: Removing of files from Server2 IF the same file is removed from Server1.

Hi Folks, I have a requirement of file management on different servers. Source Server is SERVER-A. Two servers will fetch files from SERVER-A: SERVER1 and SERVER2. 4th SERVER is SERVER-B, It will fetch files from SERVER1. If SERVER1 goes DOWN, SERVER-B will fetch pending files from... (2 Replies)
Discussion started by: Raza Ali
2 Replies

10. Shell Programming and Scripting

Recover the original file once removed

Hi All, Is there is any machanisim, once delete the file can we restore it. Thanks (8 Replies)
Discussion started by: bmk123
8 Replies
reference_element(7rheolef)					    rheolef-6.1 				       reference_element(7rheolef)

NAME
reference_element - reference element SYNOPSYS
The reference_element class defines all supported types of geometrical elements in one, two and three dimensions. The set of supported ele- ments are designate by a letter p point (dimension 0) e edge (dimension 1) t triangle(dimension 2) q quadrangle(dimension 2) T tetrahedron(dimension 3) P prism(dimension 3) H hexaedron(dimension 3) IMPLEMENTATION
class reference_element { public: // typedefs: typedef std::vector<int>::size_type size_type; // defines variant_type { p, t, q ..., H, ...}; // in an automatically generated file : typedef size_type variant_type; static const variant_type p = 0, e = 1, t = 2, q = 3, T = 4, P = 5, H = 6, max_variant = 7; // allocators/deallocators: reference_element (variant_type x = max_variant) : _x(x) { assert_macro (x >= 0 && x <= max_variant, "invalid type " << x); } // accessors: variant_type variant() const { return _x; } char name() const { return _name[_x]; } size_type dimension() const { return _dimension[_x]; } friend Float measure (reference_element hat_K); size_type size() const { return _n_vertex[_x]; } size_type n_subgeo(size_type subgeo_dim) const { return n_subgeo (variant(), subgeo_dim); } size_type n_edge() const { return n_subgeo(1); } size_type n_face() const { return n_subgeo(2); } size_type subgeo_size (size_type subgeo_dim, size_type loc_isid) const { return subgeo_n_node (_x, 1, subgeo_dim, loc_isid); } size_type subgeo_local_vertex(size_type subgeo_dim, size_type loc_isid, size_type loc_jsidvert) const { return subgeo_local_node (_x, 1, subgeo_dim, loc_isid, loc_jsidvert); } void set_variant (variant_type x) { _x = x; } void set_variant (size_type n_vertex, size_type dim) { _x = variant (n_vertex, dim); } void set_name (char name); // helpers: static variant_type variant (char name); static variant_type variant (size_type n_vertex, size_type dim); static char name (variant_type variant) { return _name [variant]; } static size_type dimension (variant_type variant) { return _dimension[variant]; } static size_type n_vertex (variant_type variant) { return _n_vertex [variant]; } static size_type n_node (variant_type variant, size_type order); static size_type n_sub_edge (variant_type variant); static size_type n_sub_face (variant_type variant); static size_type n_subgeo (variant_type variant, size_type subgeo_dim); static size_type subgeo_n_node (variant_type variant, size_type order, size_type subgeo_dim, size_type loc_isid); static size_type subgeo_local_node (variant_type variant, size_type order, size_type subgeo_dim, size_type loc_isid, size_type loc_jsidnod); static variant_type first_variant_by_dimension (size_type dim) { return _first_variant_by_dimension[dim]; } static variant_type last_variant_by_dimension (size_type dim) { return _first_variant_by_dimension[dim+1]; } static size_type first_inod_by_variant (variant_type variant, size_type order, variant_type subgeo_variant); static size_type last_inod_by_variant (variant_type variant, size_type order, variant_type subgeo_variant) { return first_inod_by_variant (variant, order, subgeo_variant+1); } static size_type first_inod (variant_type variant, size_type order, size_type subgeo_dim) { return first_inod_by_variant (variant, order, first_variant_by_dimension(subgeo_dim)); } static size_type last_inod (variant_type variant, size_type order, size_type subgeo_dim) { return first_inod_by_variant (variant, order, last_variant_by_dimension(subgeo_dim)); } static void init_local_nnode_by_variant (size_type order, boost::array<size_type,reference_element::max_variant>& loc_nnod_by_variant); protected: // constants: static const char _name [max_variant]; static const size_type _dimension [max_variant]; static const size_type _n_vertex [max_variant]; static const variant_type _first_variant_by_dimension[5]; // data: variant_type _x; }; rheolef-6.1 rheolef-6.1 reference_element(7rheolef)
All times are GMT -4. The time now is 05:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy