473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

explain the meaning of the command

explain the following command in vi (THANK YOU)

14G3Y20G2p:r!date +%A|wc -m
Feb 18 '09 #1
1 3074
Nepomuk
3,112 Expert 2GB
OK, that's a long one. Let's see...
I'm not quite sure, how you entered that command, but I'll tell you about the parts of it that I understand.
  • Most things behind an exclamation mark is treated as external commands from within vi. So I assume, that the part date +%A|wc -m is meant to operate in that way. This command actually uses two programs: date (which gives information about the current date) and wc (which counts various things).
  • Here, we have date +%A which, according to man date gives you the name of the day of the week (e.g. Wednesday today).
  • That name is piped to the command wc -m with that | operator.
  • wc -m counts the number of characters in whatever it is given. (Check man wc for more information.) So, date +%A | wc -m will give you the number of characters in the current day of the week.
  • The :r command will read an external file. So, if you enter [i]:r!date|wc -m while running vi, it will enter the amount of characters in the current date into the file you're just editing. However, vi complains about the % with me. You can escape it with the following command:
    Expand|Select|Wrap|Line Numbers
    1. :r!date +\%A| wc -m
If you tell us, how exactly you entered this command (where you within vim maybe? Or did you try to use vi 14...?), I'm sure we can help you some more.

Greetings,
Nepomuk
Feb 18 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yash | last post by:
Hi, Can someone please explain to me what the StreamReader.DiscardBufferedData method does? The documentation says "Use DiscardBufferedData to seek to a known location in the underlying stream...
13
by: C++fan | last post by:
The following code is for list operation. But I can not understand. Could anyone explain the code for me? /* * List definitions. */ #define LIST_HEAD(name, type) struct name { type...
3
by: Lenn | last post by:
Hello, I have the following example of AsyncCallback from a C# book which I wanted to implement in my project: //Class with AsyncDelegate public class AsyncProcess { public AsyncProcess() {
10
by: Jeff Boes | last post by:
I'm hoping there's someone here with experience in building the Visual Explain tool from Red Hat. I downloaded it and the J2 SDK, but when I attempt to follow the build instructions, I get messages...
5
by: Jon Lapham | last post by:
I have been using the EXPLAIN ANALYZE command to debug some performance bottlenecks in my database. In doing so, I have found an oddity (to me anyway). The "19ms" total runtime reported below...
87
by: Robert Seacord | last post by:
The SEI has published CMU/SEI-2006-TR-006 "Specifications for Managed Strings" and released a "proof-of-concept" implementation of the managed string library. The specification, source code for...
3
by: db2admin | last post by:
hi, our db2advis is broken and i am trying to find other ways to get recommended indexes i tried using command "SET CURRENT EXPLAIN MODE RECOMMEND INDEXES" and it populated ADVISE_INDEXES...
1
by: hstiwana | last post by:
i have data in access (mdb) for word meaning (dictionary) software from english to punjabi. i want to add search command in the program that the program is picking words from the databas as per...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.