Sponsored Content
Full Discussion: How to pipe command
Top Forums UNIX for Advanced & Expert Users How to pipe command Post 17772 by anonymous.nico on Wednesday 20th of March 2002 04:19:31 AM
Old 03-20-2002
How to pipe command

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 result of this command with the text editor command (suppose dtpad).

So my question is : does it exist a way to make something like

ls -lrt | cut -c55- | tail -1 | dtpad XXXX

where XXXX is a variable or a command to force the dtpad command to take as parameter the result of the pipe


Thanks by advance,
Nicolas.
France
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

pipe command

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)
Discussion started by: zomboo
1 Replies

2. UNIX for Dummies Questions & Answers

How can I use pipe command ?

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)
Discussion started by: bintaleb
11 Replies

3. UNIX for Dummies Questions & Answers

Pipe in command string

Hi, Can't you have a pipe in a command string ? If I try the following I get errors. Why ? > cmd="ls -lrt | grep xyz" > $cmd |: No such file or directory grep: No such file or directory xyx: No such file or directory Thanks in advance Hench (3 Replies)
Discussion started by: hench
3 Replies

4. UNIX for Advanced & Expert Users

unix command pipe

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)
Discussion started by: RubinPat
7 Replies

5. Shell Programming and Scripting

pipe grep command

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)
Discussion started by: epro66
3 Replies

6. UNIX and Linux Applications

Tee with pipe command.

cat work.txt M|324324|32424|3431 M|324324|32424|3431 N|324324|32426|3432 N|324324|32424|3434 M|324324|32424|3435 cat work.txt | tee $( grep '^M' > m.txt ) | $( grep '^N' > n.txt ) cehpny00:/home01/sr38632 $ cat m.txt M|324324|32424|3431 M|324324|32424|3431 M|324324|32424|3435 ... (2 Replies)
Discussion started by: rsampathy
2 Replies

7. Shell Programming and Scripting

pipe in command

Hello, I try to concatenate a command to execute. Sadly it throws an error. #!/bin/bash cd / cmd="find -name *.txt | awk '{ printf "FILE: "$1; system("less "$1);}' | egrep 'FILE:|$1'" echo "1." $($cmd) echo "2." $("$cmd") echo "3." `$cmd` echo "4." `"$cmd"`1.&3. 'find: paths must... (2 Replies)
Discussion started by: daWonderer
2 Replies

8. Shell Programming and Scripting

Single command pipe

Single command to ls all the files inside a particular directory hierachy and output this to a file and open this in a vim file so that i can use gf command in vim to browse through all the files inside this hierachy. eg : dir1/dir2 and dir1/dir3 dir2 and dir3 contain the files i need... (7 Replies)
Discussion started by: dll_fpga
7 Replies

9. Shell Programming and Scripting

Pipe command to script

Hello to all, Having a ruby script that works when an argument is given in command line in this way: ruby script.rb input_to_ruby To accept arguments as input, inside the ruby script has File.open(ARGV) input_to_ruby is generated by another command, so I need to create first input_to_ruby... (6 Replies)
Discussion started by: Ophiuchus
6 Replies

10. Shell Programming and Scripting

Would pipe work better with this command

Hi again, have a script that I would like run, but before I can run it I need to strip out the windows \r end of lines. I have put the command into a text file and set the command to run every 10 seconds the coomand I use to do this is while sleep 10; do... (15 Replies)
Discussion started by: Paul Walker
15 Replies
KATOOB(1)						      General Commands Manual							 KATOOB(1)

NAME
katoob - A Gtk2 light weight multilingual BiDi aware text editor. katoob is a text editor for X, You can use it to create and edit text files. Katoob support reading and saving text files in many encod- ings. As well as importing / exporting to HTML character reference. SYNOPSIS
katoob [options] files... DESCRIPTION
This manual page documents briefly the katoob commands. katoob is a light weight, multi lingual, BiDi aware text editor. It supports opening and saving files in multiple encodings. The main sup- port was for Arabic language but more languages are currently supported. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. -h, --help Show summary of options. -v, --version Show version of program. -u, --usage Display brief usage message. - Read input from the standard input. files... Specifies the files to be opened. Multiple files are supported but they should be separated by spaces, Reading from pipes is also supported by using a dash "-". If no files specified, Katoob'll start with an empty document. FILES
$HOME/.katoob/ User's configuration files directory $HOME/.katoob/config Main configuration file $HOME/.katoob/recent Recent files list $PREFIX/share/katoob Global program directory EXAMPLES
Opening multiple files: katoob foo.txt bar.text zot Opening a file called foo and the output of cat: cat bar | katoob foo - Reading from a pipe: ls | katoob - Reading from multiple pipes: katoob - - Here katoob'll try to read from the standard input 2 times. To close the standard input you should press CTRL-D For each dash passed, Katoob'll reopen the standard input and read from it. BUGS
Something like cat foo | katoob - - "should read cat output and then wait for the user input and open each one in a separate document" is not supported. AUTHOR
katoob was written by Mohammed Sameer. BUGS
Bugs should be reported at http://bugzilla.arabeyes.org/ or the Arabeyes.org developer mailing list developer@arabeyes.org. June 22, 2003 KATOOB(1)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy