10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have the following code. I wonder if it can be combined into 1 command.
y=`ls -1| tail -n 1`
m=${y%.abc}
Thank you. (3 Replies)
Discussion started by: april
3 Replies
2. Shell Programming and Scripting
I wish to traverse all files and folders under a given directory say "/tmp/configuration" and for all ip address mentioned therein.
I tried find ./ -type f | xargs grep "*.*.*.*" but it does not populated the correct results.
Can you please suggest. (1 Reply)
Discussion started by: mohtashims
1 Replies
3. Shell Programming and Scripting
Hi,
I've been trying to filter a file which has several repetitions of lines which looks as follows:
('hello
My name is
jamie
blabla
xyz>>)
Each line has different values in them. I want grep or awk or sed to treat everything within the (' and >>) as one line and then filter for a... (2 Replies)
Discussion started by: jamie_123
2 Replies
4. Shell Programming and Scripting
Hi,
I have two variables
pscmd="ps -exf | grep "
pid=15560
When I say
var=$( $pscmd $pid )
echo $var
it shows output of all processes on the OS rather than just 15560.
So, i guess it only executes "ps -exf | grep " rather than "ps -exf | grep 15560"
Can you... (2 Replies)
Discussion started by: mohtashims
2 Replies
5. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
6. Shell Programming and Scripting
sed -e :a -e 's/<*>//g;/</N;//ba' a2.html -removes html tags
and
sed -i 's/YOURS TRULY/Joe Bob/' a2.html
Replaces a string with another string
can i make it into one string? (2 Replies)
Discussion started by: boyboy1212
2 Replies
7. Shell Programming and Scripting
I'm working with a file with an xml structure. I'd like to parse it down to just the bits i want. Here is and example of the file
<message id="96352877" method="status">
<date rfc="Sat, 12 Mar 2011 16:13:15 -0600" unix="1299967995" />
<services>
<service id="facebook"... (4 Replies)
Discussion started by: Erulisseuiin
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
i tried to combine grep with find and it didnt work
grep 'find dirname filename"
i also would like that the file will be sorted in the way.
thanks a lot. (2 Replies)
Discussion started by: Spoiler
2 Replies
9. Shell Programming and Scripting
How i can combine output of two commands in one file.......i tried this but it is not working although each command is working good seperately.....
head -1 filename | tail -1 filename
i think there is problem with command concatenator? (16 Replies)
Discussion started by: 33junaid
16 Replies
10. AIX
Hello,
I'm a newbie on this AIX/Unix.
I'm trying to combine the space of /testing1/ to /testing2/, so that /testing2/ may have more space.
How do I accomplish this?
I guess I have to unmount /testing1/ from /apple26lv first...
but after that I'm not sure how this can be accomplished?
... (3 Replies)
Discussion started by: cchiang12
3 Replies