The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
no options nascimento.rp AIX 2 08-20-2006 11:46 AM
options terms5 UNIX for Dummies Questions & Answers 1 01-26-2006 09:50 PM
sed h and g options sivasenthil_k Shell Programming and Scripting 9 01-04-2006 05:21 AM
options with awk mips Shell Programming and Scripting 2 05-15-2004 12:33 AM
cp options milage UNIX for Dummies Questions & Answers 3 07-12-2001 09:20 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-08-2002
Registered User
 

Join Date: Sep 2002
Posts: 1
Question cat and wc options

Hi there

Can anyone tell me how to concatenate everything except the first line from one file to another.

right now I'm just doing
cat file1 >> file2, but I don't want the first line copied.

Also, does anyone know how to get a word count on every file with no file extension and execute permissions for others.
I've done this for all c files by the command
find . -name "*.c" -print | wc -l

but when I ealier found the files with no file extension and execute permission for others I used:

find "$argv[1] " -name "*" " grep -v "\."
foreach file (file2)
if (! -d $file && -x $file) then
.....

and I don't know how to incorporate this definition into a word count.

Thank for any help
Laura
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-08-2002
inquirer
Guest
 

Posts: n/a
Lightbulb try this ...

try this ...

tail -n +2 file1 >> file2

then

ls | tr '.' '+' | grep -v "+" > output

for x in `cut -f1 -d" " output`
do
wc -l $x
done

Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:58 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0