473,324 Members | 2,541 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,324 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 3070
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.