10-20-2009
Hi,
Thanks for the feedback!
Hmmm, its the time below, and how can i apply this command to a file in unix shell ?
Regards
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I was wondering if it's possible to use a command to get the first 3 characters of a line in a text file, I tried grep but it returns the whole line but I am only interested in the first 3 characters. Is this possible with grep or I need any other command?
Also is it possible deleting from... (2 Replies)
Discussion started by: g-e-n-o
2 Replies
2. UNIX for Dummies Questions & Answers
give this a try and let me know if it works
grep '^' filename
rachael (2 Replies)
Discussion started by: rachael
2 Replies
3. Shell Programming and Scripting
I wrote this script for:
1. Get the Web log for today
2. Give me a list of all the IP addresses that have accessed the web server today
3. Remove a list of known IPs listed in a file (line by line)
4. Mail the final file to selected recipients.
I am unable to do part 3. In the script... (3 Replies)
Discussion started by: skotapal
3 Replies
4. Shell Programming and Scripting
Hey All,
I have to grep for an error from a file and get the results of errror in a different file......
But there should be no duplicate entries. Can anyone help me in giving a shell script for this
This is file which contains pattern error which I am supposed to grep and put this in a... (4 Replies)
Discussion started by: achararun
4 Replies
5. Shell Programming and Scripting
I need to know if anyone can assist me on how to grab the last (we'll just say "x" minutes) of a log file. How do you tell the grep command without specifying an exact window of time? (So relative instead of absolute.)
Thanks,
Jon (2 Replies)
Discussion started by: jtelep
2 Replies
6. Shell Programming and Scripting
Guys ..
Need to pull this highlighted strings irrespective of line numbers & should be echoed . But these strings are from Outfile from different dir. In which way this can be grepped ?? Need an idea
http-timeout 120 seconds
persistent-timeout 180 seconds
host-rewriting on
... (7 Replies)
Discussion started by: raghunsi
7 Replies
7. UNIX for Dummies Questions & Answers
I have a log file and I have two unique strings which represent the start and end of the text I want to obtain.
How can I get all the text inbetween this start string and the end string?
Thanks (2 Replies)
Discussion started by: chrisjones
2 Replies
8. Shell Programming and Scripting
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Discussion started by: personalt
3 Replies
9. Shell Programming and Scripting
Hi All,
I have a log file where every line contains a date and some other data, i want to grep only the date from every line to a different file.
Please help how to get this.
Thanks in advance !! (25 Replies)
Discussion started by: nanz143
25 Replies
10. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
LEARN ABOUT FREEBSD
apply
APPLY(1) BSD General Commands Manual APPLY(1)
NAME
apply -- apply a command to a set of arguments
SYNOPSIS
apply [-a c] [-d] [-#] command argument ...
DESCRIPTION
The apply utility runs the named command on each argument argument in turn.
Character sequences of the form ``%d'' in command, where 'd' is a digit from 1 to 9, are replaced by the d'th following unused argument. In
this case, the largest digit number of arguments are discarded for each execution of command.
The options are as follows:
-# Normally arguments are taken singly; the optional number -# specifies the number of arguments to be passed to command. If the number
is zero, command is run, without arguments, once for each argument.
If any sequences of ``%d'' occur in command, the -# option is ignored.
-a c The use of the character '%' as a magic character may be changed with the -a option.
-d Display the commands that would have been executed, but do not actually execute them.
ENVIRONMENT
The following environment variable affects the execution of apply:
SHELL Pathname of shell to use. If this variable is not defined, the Bourne shell is used.
FILES
/bin/sh default shell
EXAMPLES
apply echo *
is similar to ls(1);
apply -2 cmp a1 b1 a2 b2 a3 b3
compares the `a' files to the `b' files;
apply -0 who 1 2 3 4 5
runs who(1) 5 times; and
apply 'ln %1 /usr/joe' *
links all files in the current directory to the directory /usr/joe.
HISTORY
The apply command appeared in 4.2BSD.
AUTHORS
Rob Pike
BUGS
Shell metacharacters in command may have bizarre effects; it is best to enclose complicated commands in single quotes ('').
The apply utility does not recognize multibyte characters.
BSD
December 13, 2006 BSD