05-03-2011
Thank you for your reply but I will use this one:
PHP Code:
ls | xargs file | grep 'text'
looks like sweet and neat
as I only want to display the file of type text.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need a favour
if ( grep -i adding mpg* | grep -iv equation | ls -ctr | tail -1 ) # if it is not found
echo "log couldnot find "
else
var='grep -i adding mpg* | grep -iv equation | ls -ctr | tail -1'
for the above i am struggling with syntax
could someone please help me in that (1 Reply)
Discussion started by: mail2sant
1 Replies
2. Shell Programming and Scripting
Hi,
in a shell script how can I put the result of a grep command in a variable :
myvariable=grep mystring myfilename
Thank you. (3 Replies)
Discussion started by: big123456
3 Replies
3. Shell Programming and Scripting
Hi,
I worte a script which runs perfect when i execute it manually. But when i scheduled into cron the grep command alone is not working.
the sample script,
/usr/bin/grep FTP $subfile > /tmp/tfsrec.dat
tfs=`echo $?`
if
then
echo "FTP FOUND"
else
echo "FTP NOT FOUND"
Where... (5 Replies)
Discussion started by: thiru_cs
5 Replies
4. Shell Programming and Scripting
Dear Experts,
My file contains below-
GET:SUB:ISI,432350414557432;
RESP:0:MD,019352020633:ISI,432350414557432:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,1:BOIC,0:BIRO,0:BORO,0:PAID,1;
GET:SUB:ISI,432350414581060;... (2 Replies)
Discussion started by: thepurple
2 Replies
5. UNIX for Advanced & Expert Users
Hi Folk,
Following is the command I used to get data related to the DataFlowEngine.
I wanted to know the % usage of cpu and memory.
ps avg | grep Data
This command will show the processes with its PID as :
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
... (1 Reply)
Discussion started by: varungupta
1 Replies
6. Shell Programming and Scripting
Hi,
I am very new to Unix script. Suppose i have a file with column header:
NAME1 NAME2 Address Tel
And I always need to make a file with column header:
ID NAME1 NAME2 EMail Address Tel
For the columns that do not exist in the file, I would still like to make a column with blank.
... (11 Replies)
Discussion started by: nightrider
11 Replies
7. Shell Programming and Scripting
Hi,
my xml files looks something like this
<Instance Name="New York">
<Description></Description>
<Instance Name="A">
<Description></Description>
<PropertyValue Key="false" Name="Building A" />
</Instance>
<Instance Name="B">
... (4 Replies)
Discussion started by: tententen
4 Replies
8. Shell Programming and Scripting
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies
9. Shell Programming and Scripting
I have mail:
cat /home/oracle/scripts/dbsizedaily.txt | mail -s "$TODAY: PROD DB Size" $RECIPIENTS
I like to get and put USED_GB and %USED of the very last row from /home/oracle/scripts/dbsizedaily.txt.
/home/oracle/scripts/dbsizedaily.txt has :
DATE TIME TOTAL_GB USED_GB ... (6 Replies)
Discussion started by: Daniel Gate
6 Replies