Please explain this command line ?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Please explain this command line ?
# 1  
Old 12-28-2005
Power Please explain this command line ?

Please explain this command line ?

wc<infile<newfile

Thanx,
Saneesh Joseph.
# 2  
Old 12-28-2005
Hi vino,

This is not a duplicate post..

Both are two different command lines.

Thanx and Regards,
Saneesh Joseph
# 3  
Old 12-28-2005
Quote:
Originally Posted by saneeshjose
Please explain this command line ?

wc<infile<newfile

Thanx,
Saneesh Joseph.
It will display the following details of new file : the number of bytes, words, and lines

It is the same as wc <newfile or wc newfile

Code:
[/tmp]$ cat infile
abc
def
ghi
[/tmp]$ cat newfile
123
456
789
asd
fgh
jkl
[/tmp]$ wc <newfile
      6       6      24
[/tmp]$ wc <infile
      3       3      12
[/tmp]$ wc <newfile <infile
      3       3      12
[/tmp]$ wc newfile infile
      6       6      24 newfile
      3       3      12 infile
      9       9      36 total
[/tmp]$

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Explain iconv command

I have a requirement to remove all non-ascii characters from a fixed length file. I used the below command which is removing special characters but somehow the total record length is being truncated to one space less. If it is a multi-byte string then many characters at the end are being truncated.... (8 Replies)
Discussion started by: eskay
8 Replies

2. Red Hat

Please help to explain the command

su - keibatch -c ""date ; /usr/local/kei/batch/apb/bin/JKEIKYK4140.sh -run "&$C$6&" WSUKE100201"" Not clear about : date ; /usr/local/kei/batch/apb/bin/JKEIKYK4140.sh -run "&$C$6&" WSUKE100201 Please help (2 Replies)
Discussion started by: honda_city
2 Replies

3. UNIX for Dummies Questions & Answers

Can anyone explain this line

Hello, Can anyone explain this line of code echo -e "\033 What does '\033' do what does [0;32m do what does [m do? I tried testing this line using a script Whatever i pass as input to the script it is spit out the developer could have simply said echo $1 why did he use all of... (6 Replies)
Discussion started by: ramky79
6 Replies

4. Shell Programming and Scripting

Explain sed command

sed -e 's,*$,,' Can someone explain the options in this command? (2 Replies)
Discussion started by: scj2012
2 Replies

5. UNIX for Dummies Questions & Answers

Please explain this command?

Hi, I saw this. But I don't know why we need this? ls mydir > foo.txt ## I know what this will do, it will take the results and write to the file called foo.txt ls mydir > foo.txt 2>&1 ## Don't know why we need 2>&1 Thanks. (2 Replies)
Discussion started by: samnyc
2 Replies

6. Shell Programming and Scripting

Please Explain me this command

find . -type f -ctime +3 -exec mv {} /somedirectory/ \; in particular "-ctime v/s -mtime" and "difference between +3 and -3" (5 Replies)
Discussion started by: Rambo
5 Replies

7. Shell Programming and Scripting

sed -e 's%/$%%' explain this command

mount -ps | tail -1 | awk '{print $1}' | sed -e 's%/$%%' can you please explain this command mainly sed -e 's%/$%%' this.... (5 Replies)
Discussion started by: rsivasan
5 Replies

8. UNIX for Dummies Questions & Answers

Can anyone explain what this command is doing?

Specifically what is the purpose of sed? What is f? Why is the 'cp f $phonefile' line needed when the script ‘goes live'? Why might that two commands following sed be commented out at the present time ( i.e., during development)? Thanks in... (2 Replies)
Discussion started by: knp808
2 Replies

9. Shell Programming and Scripting

please explain the command

Hi all , please explain the following command : perl -e 'select(undef,undef,undef,.15)' Thanks and Regards Navatha (2 Replies)
Discussion started by: Navatha
2 Replies

10. UNIX for Dummies Questions & Answers

explain command plz

echo -n "1. Updating Password Policy in OID..." | tee -a $logfile set ldap_v1 = `ldapsearch -b "" -h $oid_host -p $oid_port -D "cn=orcladmin" -w $admin_pwd -s sub "cn=PwdPolicyEntry" dn | head -1` echo "dn:$ldap_v1" > ldap1.out echo "changetype:modify" >> ldap1.out echo... (2 Replies)
Discussion started by: maoro
2 Replies
Login or Register to Ask a Question