Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Move File Containing More Than two "-" at 3rd Line To New Directory Post 302944240 by Nexeu on Monday 18th of May 2015 04:11:32 AM
Old 05-18-2015
Code:
File line 3 bad format: κ.txt
File line 3 bad format: μci.txt
File line 3 bad format: μg.txt
File line 3 bad format: μm.txt
Processing list file: "../Syllable/list0H"
Processing list file: "../Syllable/list10H"
Processing list file: "../Syllable/list11H"
Processing list file: "../Syllable/list12H"
Processing list file: "../Syllable/list13H"
Processing list file: "../Syllable/list14H"
Processing list file: "../Syllable/list15H"
Processing list file: "../Syllable/list18H"
Processing list file: "../Syllable/list1H"
Processing list file: "../Syllable/list2H"
Processing list file: "../Syllable/list3H"
Processing list file: "../Syllable/list4H"
Processing list file: "../Syllable/list5H"
Processing list file: "../Syllable/list6H"
Processing list file: "../Syllable/list7H"
Processing list file: "../Syllable/list8H"
Processing list file: "../Syllable/list9H"
Untitleds-MacBook-Pro:~ Nexeu$

OMG IT WORKS! THANK YOU SO MUCH! I can never thank you enough. It's finally done after so many months. I really owe you Don. Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

3. UNIX for Dummies Questions & Answers

script works well but displays " line 6: =: No such file or directory"

strange :) can you tell why?:cool: #!/bin/bash echo " enter your age " read age if ; then echo " you do not have to pay tax " elif ]; then echo " you are eligible for income tax " else echo " you dont have to pay tax " fi (3 Replies)
Discussion started by: me.
3 Replies

4. UNIX for Dummies Questions & Answers

look for file size greater than "0" of specific pattern and move those to another directory

Hi , i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory.. Ex... abc_0702, abc_0709, abc_782 abc_1234 ...etc need to find out which is having the size >0 and move those to target directory..... (7 Replies)
Discussion started by: dssyadav
7 Replies

5. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

6. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

7. Shell Programming and Scripting

Move a line containg "char" above line containing "xchar"

Okay, so I have a rather large text file and will have to process many more and this will save me hours of work. I'm not very good at scripting, so bear with me please. Working on Linux RHEL I've been able to filter and edit and clean up using sed, but I have a problem with moving lines. ... (9 Replies)
Discussion started by: rex007can
9 Replies

8. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
Coy(3pm)						User Contributed Perl Documentation						  Coy(3pm)

NAME
Coy - like Carp only prettier SYNOPSIS
# In your application: # ==================== use Coy; warn "There seems to be a problem"; die "Looks like it might be fatal"; # You can add vocab in the $HOME/.coyrc file: # =========================================== noun RESET; # REMOVE EXISTING noun VOCAB # WORKS FOR OTHER SPECIFIERS TOO noun { wookie => { category => [ Sentient ], sound => [ "roars", "grunts", "bellows" ], act => { sits => { location => Arborial }, fights => { minimum => 2, association => "argument", }, }, }, }; category { Sentient => { act => { quarrels => { associations => "argument", location => Terrestrial, minimum => 2, synonyms => [qw(bickers argues)], }, laughs => { associations => "happy", location => Terrestrial, non_adjectival => 1, }, }, } }; personage "R2D2"; personage "Darth Vader"; place "Mos Eisley"; place "the Death Star"; tree "Alderaan mangrove"; fruit_tree "Wookie-oak"; # You can also select a different syllable counter via .coyrc # =========================================================== use Lingua::EN::Syllables::syllable; syllable_counter "Lingua::EN::Syllables::syllable"; # or use Lingua::EN::Syllables::syllable; syllable_counter &Lingua::EN::Syllables::syllable; # or syllable_counter sub { return 1 }; # FAST BUT INACCURATE DESCRIPTION
Error messages strewn across my terminal. A vein starts to throb. Their reproof adds the injury of insult to the shame of failure. When a program dies what you need is a moment of serenity. The Coy.pm module brings tranquillity to your debugging. The module alters the behaviour of C<die> and C<warn> (and C<croak> and C<carp>). It also provides C<transcend> and C<enlighten> -- two Zen alternatives. Like Carp.pm, Coy reports errors from the caller's point-of-view. But it prefaces the bad news of failure with a soothing haiku. The haiku are not "canned", but are generated freshly every time. Once the haiku is complete, it's prepended to the error message. Execution of the original call to C<die> or C<warn> resumes. Haiku and error message strew across my screen. A smile starts to form. EXTENDING THE VOCABULARY
Any code placed in "$ENV{HOME}/.coyrc" runs at compile-time. You can use that file to extend Coy.pm's vocabulary. The "SYNOPSIS" at the start of this POD shows how you might set it up. (Eventually this section will detail the full mechanism.) CHANGING THE SYLLABLE COUNTER
Real haiku often <BR> have imperfect syllable<BR> counts. The deficiencies of<BR> Coy's inbuilt counter are thus<BR> artistic virtues. But some connoisseurs<BR> demand their syllable counts<BR> be always exact. So if you don't like<BR> the syllable counter, Coy<BR> let's you replace it. Coy provides a sub called C<syllable_counter> for that very purpose. It is passed a sub reference. That sub is then used to count syllables. You can also pass the sub's I<name> (that is, pass a symbolic reference). The new counter sub should take a string and return its syllable count. C<syllable_counter> can be called from your code, or from .coyrc. BUGS AND LIMITATIONS
In its current form, the module has four problems and limitations: * Vocabulary: The list of nouns and verbs is too small at present. This limits the range of topics that the haiku produced can cover. That in turn leads to tell-tale repetition (which fails the Turing test). Extending the range of words Coy.pm can use is no problem (though finding the time and the creativity required may be :-). Users of Coy are encouraged to add their own vocabulary. (See the "SYNOPSIS", and also "EXTENDING THE VOCABULARY"). * Associations: The vocabulary has too few topic links. Hence it's often not able to find relevant words for a message. This leads to haiku utterly unrelated to the error text. Again, there is no technical difficulty in adding more links: Defining enough associations isn't hard, just tedious. User-specified vocabularies can solve this problem as well. * Limited grammar: The number of syntactic templates is too small. This leads to haiku that are (structurally, at least) monotonous. Yet again, this needs no technical solution, just time and effort. Of course, such enhanced templates might require richer vocabulary. For example, verb predicates would need extra database structure: Each verb entry would have to be extended with links to object nouns. * Syllable counting: This is perhaps the major problem at present. The algorithmic syllable counter is still being developed. It is currently around 96% accurate (per word). This means that correct syllable counts for haiku can't be guaranteed. Syllable counts for single words are correct to plus-or-minus 1. In a multi-word haiku these errors cancel out in most cases. Thus, the haiku tend to be correct within one or two syllables. As the syllable counter slowly improves, this problem will abate. Alteratively, you can choose to use your own syllable counter. (See above in the section titled "CHANGING THE SYLLABLE COUNTER".) AUTHOR
The Coy.pm module was developed by Damian Conway. COPYRIGHT
Copyright (c) 1998-2000, Damian Conway. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html) perl v5.8.8 2007-07-30 Coy(3pm)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy