Hi Ophiuchus ,
Expanding on what disedorgue said, if:
won't work in your shell (recent versions of both bash and ksh support this syntax), some systems have a pathname in /dev or /proc that is a name for the process's file descriptor 0 (AKA standard input). For example, on Mac OS X, the following should work for you:
If neither of these work for you and you can't find a name for standard input in the filesystem hierarchy on your system, we might be able to help you find a way to make it work if you'd tell us what operating system and shell you are using.
These 2 Users Gave Thanks to Don Cragun For This Post:
Hi All,
I want to create a command that executes a text editor with the most recent file in the current current directory.
So a good start to achieve this is :
ls -lrt | cut -c55- | tail -1
which provides the name of the most recent file in a directory
The problem is to pipe the... (4 Replies)
current dir :
/home/sales
ls -l
abc.txt 17th aug
bcd .txt 16t oct
-------
------
Total files : 100
if i want to move only those files dated 17 aug into another sub directory /home/sales/texas
how do i pipe the result of 'ls' command to a 'mv' command (1 Reply)
Hi My friends
I have used this command to find files are modified within the past 24 hours
and then many files are shown but I want transfer all these files to special directory by using pipe .
can any one tell me what is the next step ? (11 Replies)
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)
I am pretty new to UNIX. My client has a requirement where in a directory we have some files with somewhat similar name
like test_XX.txt, test_XY.txt, test_XZ.txt, test_ZZ.txt, test_ZY.txt, test_ZX.txt, test_YY.txt......Out of these files
few files have 0 bytes. Is there a way where we can go... (7 Replies)
Hi all,
Can someone help me with the following problem.
I am executing the following command:
(search for occurences of 'error' in files that match cl-*.log expression)
> grep -cw -i --max-count=1 'error' cl-*.log
this command outputs:
cl-apache.log:1
cl-apache_error.log:1... (3 Replies)
Trying to get the below command to work which it does, however each time, regardless of host being up or not it always loops back to the start of the function where I need it to stop if the host is up and continue with teh rest of teh function.
echo -ne "Remote/local host address. Example... (2 Replies)
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)
There is a text file in my project named as "mom.txt" in which i want to have contents like..................
LSCRM(Application Name):
1: This is my first application.
2: Today we did shell scripting automation for this app.
3: It was really a good fun in doing so.
4: Really good.| (Here i... (7 Replies)