9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried
export OFS="|"; w
but that does not work.
Any ideas? (4 Replies)
Discussion started by: Soham
4 Replies
2. SuSE
Hi,
I am using below code snippet to echo/display the files found
(matching a pattern from searchstring.out file) and the corresponding owner.
while read j
do
echo "Pattern to search is:- $j"
find / -name "*$j*" |\
while read k
do
echo "File found is:- $k"
owner=$(ls... (9 Replies)
Discussion started by: Vipin Batra
9 Replies
3. Shell Programming and Scripting
Hi Team,
Need a help on how to pipe a command out put to a shell script. My shell script looks like below.
cat shell_script
#!/usr/bin/ksh
input =$@
echo " we are inside the shell script"
echo " here are the input parameters"
..........................
..................
... (11 Replies)
Discussion started by: gvkumar25
11 Replies
4. UNIX for Dummies Questions & Answers
I have been using unix on and off for a number of years. I am not a sys admin. I use what I need. I have googled this, but I really can't figure out what is the difference between using xarg and just using a regular pipe? Why do I need to include xarg sometimes and how do I know when I need it? (2 Replies)
Discussion started by: guessingo
2 Replies
5. Programming
I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them.
can someone help me understand this? (1 Reply)
Discussion started by: guessingo
1 Replies
6. Shell Programming and Scripting
I have an overnight script which runs across a large directory to repair permissions and ownership. I also have this command output the list of files affected so that cron can email these as a log file. Previously I had the command in the form:
find /path/to/files -not -user myname -print -exec... (4 Replies)
Discussion started by: mij
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am having a list of directories with different login id's. My requirement is that i need to list the directories of my id and need to delete them. So i am using following code
ls -ltr ¦ grep userid ¦ rm -rf
But this is not working. So is there any way of doing it. Please note... (3 Replies)
Discussion started by: sarbjit
3 Replies
8. Shell Programming and Scripting
Hi ,
I would like to assign command (with pipe) output to a variable. The code is as follows. The goal of the code is to get the last folder folder with a particular name pattern.
myDate=`ls | grep 2009 | tail -1`
echo "myDate=" $myDate
However, in the presence of the pipe, the code... (3 Replies)
Discussion started by: jeff_cen
3 Replies
9. UNIX for Dummies Questions & Answers
i want to redirect output of one command as the command line argument of another script
for example, say i would run this command:
find . -xdev -type f -size +4096 -exec ls -al {} \;
i wan to be able to do something like:
echo +4096 | find . -xdev -type f -size ****** -exec... (3 Replies)
Discussion started by: IMTheNachoMan
3 Replies