Sponsored Content
Full Discussion: [Beginner] Handle Files
Top Forums Shell Programming and Scripting [Beginner] Handle Files Post 302157239 by DNAx86 on Thursday 10th of January 2008 12:27:32 PM
Old 01-10-2008
Question [Beginner] Handle Files

Hi,

How can I check if a text files is empty?
(With Bash Shell)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can solaris's Zip/Unzip handle Winzip Version 10.0 Files?

I understand that this version of Winzip allows 129-bit AES encryption and passwords. Can Solaris handle that yet? (2 Replies)
Discussion started by: BCarlson
2 Replies

2. Shell Programming and Scripting

FTP - To handle error while transferring files

Hi, I had written an FTP script where in I loop through the directories and transfer the files from each and every directory of Windows to UNIX. Now the problem is when 1. The connection is unable to be established I should return some error codes 2. When there is some system... (1 Reply)
Discussion started by: mahalakshmi
1 Replies

3. UNIX for Dummies Questions & Answers

Awk cannot handle more than 30 files

I trying to search for lines with multiple search criterias in an archive of zipped files. But awk seems to have a limit. Any idea how to fix it? I'm on a sun solaris system. Here is my search string: gzcat -r *200808* | awk -v 'substr($0,50,11)=="11095512309" ||... (3 Replies)
Discussion started by: HugoH
3 Replies

4. UNIX for Dummies Questions & Answers

Grep alternative to handle large numbers of files

I am looking for a file with 'MCR0000000716214' in it. I tried the following command: grep MCR0000000716214 * The problem is that the folder I am searching in has over 87000 files and I am getting the following: bash: /bin/grep: Arg list too long Is there any command I can use that can... (6 Replies)
Discussion started by: runnerpaul
6 Replies

5. UNIX for Advanced & Expert Users

How to handle files in use during Tar?

How you do usually deal with files in use during a backup? Is there a option to let TAR skip opened files? Or notify me an opened file is tar'ed? What's the best practice? Thanks (3 Replies)
Discussion started by: overmindxp
3 Replies

6. Shell Programming and Scripting

How to handle one value below the other

Hi, I, have an output with 3 different values each below the other like: # echo $bla 123 345 234 Each value is in one line and for the further processing I need every single value. For example is there a way to grep line 2, like: # echo $bla | grep --line 2 345 :) Thank you in... (6 Replies)
Discussion started by: 2retti
6 Replies

7. UNIX for Dummies Questions & Answers

Beginner - What Should I Do First?

Hi people.... I have just started to learn unix.I want to know which version of Unix to install plus how to install it.I need to practise and make myself aware of how unix works.My thread is from an educational point of view.Also please feel free to give your suggestions as I am... (3 Replies)
Discussion started by: amit.kanade1983
3 Replies

8. UNIX for Dummies Questions & Answers

Difference between handle to the thread HANDLE and thread identifier pthread_t

This question might be silly but its confusing me a bit: What is the difference between handle to the thread HANDLE and thread identifier pthread_t? ---------- Post updated at 01:52 PM ---------- Previous update was at 01:48 PM ---------- Sorry I saw details and HANDLE is in windows and... (0 Replies)
Discussion started by: rupeshkp728
0 Replies

9. Shell Programming and Scripting

Help needed on Perl Script to Handle Log files that are rotated using logrotate

Hello all, I am working on a perl script which will read weblogic logfile and send the error messages to Zenoss Monitoring tool. At present the script works and it can able to send the error messages to Zenoss. The problem comes when the logrotate has been applied to the weblogic log file. At... (3 Replies)
Discussion started by: kar_333
3 Replies

10. Red Hat

Help me please i am beginner

i have windows 8 host on Dell Laptop vmware 9 redhat 7.2 iso downloaded through redhat official site after installation on vm it only boots into text dont show graphics Please guide:( (1 Reply)
Discussion started by: hananabbas
1 Replies
Jifty::Manual::Style(3pm)				User Contributed Perl Documentation				 Jifty::Manual::Style(3pm)

NAME
Jifty::Manual::Style - Jifty coding style guide Default style When in doubt, default to whatever Damian Conway's Perl Best Practices says. Private documentation When documenting a private method, or providing documentation which is not useful to the user of the module (and is presumably useful to the developer), wrap it in =begin/end private. This way it does not show up in perldoc where a user would see it and yet is still available and well formatted (that is, not just a lump comment) when looking at the code. =begin private =head2 import_extra Called by L<Test::More>'s C<import> code when L<Jifty::Test> is first C<use>'d, it calls L</setup>, and asks Test::More to export its symbols to the namespace that C<use>'d this one. =end private sub import_extra { ... } Test temp files Files created by tests should be declared as such using Jifty::Test->test_file() so they are cleaned up on a successful test run. Use Shell::Command Shell::Command has a number of functions which work like common shell file commands such as "touch", "cp" and "mv". They are battle tested and cross-platform. Use them instead of coding your own. For example, instead of this: open my $file, ">foo"; close $file; Do this: use Shell::Command; touch $file; Case insensitive matching To check if a string equals another string case insensitively, do this lc $foo eq lc $bar; lc $foo eq 'bar'; not this: $foo =~ /^Q$barE/i; $foo =~ /^bar$/i; perl v5.14.2 2010-12-08 Jifty::Manual::Style(3pm)
All times are GMT -4. The time now is 02:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy