summaryrefslogtreecommitdiffstats
path: root/depipe_strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'depipe_strings.c')
-rw-r--r--depipe_strings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/depipe_strings.c b/depipe_strings.c
index 597ade8..61115d7 100644
--- a/depipe_strings.c
+++ b/depipe_strings.c
@@ -15,7 +15,7 @@ char **depipe_string(const char *, int *);
int main(int argc, char **argv)
{
int count;
- char *line = " ls -1 | wc -l | cut -n1 | less | rtfm| bro ";
+ char *line = " ls -1 | wc -l | cut -b 6-7";
char **depiped = depipe_string(line, &count);
int j;
@@ -27,6 +27,7 @@ int main(int argc, char **argv)
return 0;
}
+/* chops and counts strings with arguments that are separated by pipes */
char **depipe_string(const char *line, int *count)
{
char *last = (char *) line;