Sponsored Content
Full Discussion: need help Greping "$size[0]"
Top Forums UNIX for Dummies Questions & Answers need help Greping "$size[0]" Post 302210029 by arya6000 on Sunday 29th of June 2008 10:57:33 PM
Old 06-29-2008
need help Greping "$size[0]"

Hello

I want to grep "$size[0]" how can I comment out the "[]" so it actually searches for the full thing and not 0?

Thank You
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

"sed" to check file size & echo " " to destination file

Hi, I've modified the syslogd source to include a thread that will keep track of a timer(or a timer thread). My intention is to check the file size of /var/log/messages in every one minute & if the size is more than 128KB, do a echo " " > /var/log/messages, so that the file size will be set... (7 Replies)
Discussion started by: jockey007
7 Replies

2. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

3. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. Shell Programming and Scripting

Delete files older than "x" if directory size is greater than "y"

I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y" #!/bin/bash du -hs $1 while read SIZE ENTRY do if ; then find $1 -mtime +$2 -exec rm -f {} \; echo "Files older than $2 days deleted" else echo "free Space available"... (4 Replies)
Discussion started by: JamesCarter
4 Replies

6. 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

7. SuSE

Difference in file size between "ls -l" and "du -a"

mail:/var/lib/named/proc # ls -l |grep kcore -r-------- 1 root root 140737486266368 Jun 3 19:47 kcore mail:/var/lib/named/proc # du -a |grep kcore 0 ./kcore System is SuSE 11.2 SP1. The system appears to run correctly, and the output of df -v shows the correct disk... (1 Reply)
Discussion started by: jgt
1 Replies

8. 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

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
Mojo::Collection(3pm)					User Contributed Perl Documentation				     Mojo::Collection(3pm)

NAME
Mojo::Collection - Collection SYNOPSIS
# Manipulate collections use Mojo::Collection; my $collection = Mojo::Collection->new(qw(just works)); unshift @$collection, 'it'; $collection->map(sub { ucfirst })->each(sub { my ($word, $count) = @_; say "$count: $word"; }); # Use the alternative constructor use Mojo::Collection 'c'; c(qw(a b c))->join('/')->url_escape->say; DESCRIPTION
Mojo::Collection is a container for collections. FUNCTIONS
Mojo::Collection implements the following functions. "c" my $collection = c(1, 2, 3); Construct a new Mojo::Collection object. METHODS
Mojo::Collection implements the following methods. "new" my $collection = Mojo::Collection->new(1, 2, 3); Construct a new Mojo::Collection object. "each" my @elements = $collection->each; $collection = $collection->each(sub {...}); Evaluate closure for each element in collection. $collection->each(sub { my ($e, $count) = @_; say "$count: $e"; }); "first" my $first = $collection->first; my $first = $collection->first(sub {...}); Evaluate closure for each element in collection and return the first one for which the closure returns true. my $five = $collection->first(sub { $_ == 5 }); "grep" my $new = $collection->grep(sub {...}); Evaluate closure for each element in collection and create a new collection with all elements for which the closure returned true. my $interesting = $collection->grep(sub { /mojo/i }); "join" my $stream = $collection->join(" "); Turn collection into Mojo::ByteStream. $collection->join(" ")->say; "map" my $new = $collection->map(sub {...}); Evaluate closure for each element in collection and create a new collection from the results. my $doubled = $collection->map(sub { $_ * 2 }); "reverse" my $new = $collection->reverse; Create a new collection with all elements in reverse order. "slice" my $new = $collection->slice(4 .. 7); Create a new collection with all selected elements. "shuffle" my $new = $collection->shuffle; Create a new collection with all elements in random order. "size" my $size = $collection->size; Number of elements in collection. "sort" my $new = $collection->sort; my $new = $collection->sort(sub {...}); Sort elements based on return value of closure and create a new collection from the results. my $insensitive = $collection->sort(sub { uc(shift) cmp uc(shift) }); SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::Collection(3pm)
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy