Sponsored Content
Full Discussion: Piping multiple commands
Top Forums UNIX for Dummies Questions & Answers Piping multiple commands Post 302682607 by jrymer on Monday 6th of August 2012 01:25:40 PM
Old 08-06-2012
Thanks I just thought it looked as though I could get errors if conditions changed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to do multiple commands:

NEVERMIND figured it out! (1 Reply)
Discussion started by: llsmr777
1 Replies

2. Shell Programming and Scripting

Piping through commands read as variables from file

This is going to be part of a longer script with more features, but I have boiled it down to the one thing that is presently stumping me. The goal is a script which checks for updates to web pages that can be run as a cron job. The script reads (from a tab-delim file) a URL, an MD5 digest, and an... (1 Reply)
Discussion started by: fitzwilliam
1 Replies

3. Shell Programming and Scripting

multiple commands

Hi, I have multiple commands that i need to run daily on my Solaris servers and watch the output, and actually i do it as multi-tasking. I do not want to put all of them in the file, and run it, and get the entire output at one time. What i want is that it should ask for before it runs next... (5 Replies)
Discussion started by: john_prince
5 Replies

4. Solaris

Help with executing multiple remote commands after multiple hops

Hi SSHers, I have embedded this below code in my shell script.. /usr/bin/ssh -t $USER@$SERVER1 /usr/bin/ssh $USER2@S$SERVER2 echo uptime:`/opt/OV/bin/snmpget -r 0 -t 60 $nodeName system.3.0 | cut -d: -f3-5` SSH to both these servers are public-key authenticated, so things run... (13 Replies)
Discussion started by: LinuxUser2008
13 Replies

5. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

6. UNIX for Dummies Questions & Answers

Piping commands

Hi I am tryin to undertand piping command1|command2 from what i learn output of cammand 2 is an intput for command 1 right? If so . What dose next sequence do cat f1 >> f2 | grep '^' I think it takes context of f1 and Concatenate's it to f2 and then looks for ....i don't know..... (7 Replies)
Discussion started by: iliya24
7 Replies

7. Shell Programming and Scripting

Multiple Commands in PS

I need to find in file where the record starts with "A,U,I,R" and their file name Record will look like below A|1|138||XXXX|XX|XX U|2|XX|XX|XX|XX R|3|EK|XX|XX|XX D|4|TY|CC|CC|CC find ./*.dat -exec egrep "^A|U|I|R" \; -exec cut -d'|' -f1,2 \; -exec sort -u {} /dev/null \; But... (3 Replies)
Discussion started by: Niranjancse
3 Replies

8. UNIX for Advanced & Expert Users

Pass Multiple Commands and Open Multiple Xterms via PSS

Hello, I'm attempting to open multiple xterms and run a command as an SAP user via sudo using PSSH. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in to the servers in the file list, and SUDO to the SAP(ADM) user, but it won't do anything else... (11 Replies)
Discussion started by: icemanj
11 Replies

9. Shell Programming and Scripting

Proper chaining and piping of commands

can someone please help me fix the below one liner? what i want to do is run a command, and if that command is successful, pipe the output of the command to another command. i'd prefer not to use any temp files for this. who -blahblah ; if ; then echo exit; fi | egrep username (2 Replies)
Discussion started by: SkySmart
2 Replies

10. UNIX for Beginners Questions & Answers

Piping commands using xargs

Need help in piping commands using xargs I have several .tar.gz files that I need to list the folder content in a subdirectory. For example, a.tar.gz b.tar.gz c.tar.gz The following command works great for each .tar.gz file but it's a pain to run the tar command for each file. tar -tf... (11 Replies)
Discussion started by: april
11 Replies
curs_scr_dump(3X)														 curs_scr_dump(3X)

NAME
scr_dump, scr_restore, scr_init, scr_set - read (write) a curses screen from (to) a file SYNOPSIS
#include <curses.h> int scr_dump(const char *filename); int scr_restore(const char *filename); int scr_init(const char *filename); int scr_set(const char *filename); DESCRIPTION
The scr_dump routine dumps the current contents of the virtual screen to the file filename. The scr_restore routine sets the virtual screen to the contents of filename, which must have been written using scr_dump. The next call to doupdate restores the screen to the way it looked in the dump file. The scr_init routine reads in the contents of filename and uses them to initialize the curses data structures about what the terminal cur- rently has on its screen. If the data is determined to be valid, curses bases its next update of the screen on this information rather than clearing the screen and starting from scratch. scr_init is used after initscr or a system call to share the screen with another process which has done a scr_dump after its endwin call. The data is declared invalid if the terminfo capabilities rmcup and nrrmc exist; also if the terminal has been written to since the preceding scr_dump call. The scr_set routine is a combination of scr_restore and scr_init. It tells the program that the information in filename is what is cur- rently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function. To read (write) a window from (to) a file, use the getwin and putwin routines [see curs_util(3X)]. RETURN VALUE
All routines return the integer ERR upon failure and OK upon success. X/Open defines no error conditions. In this implementation, each will return an error if the file cannot be opened. NOTES
Note that scr_init, scr_set, and scr_restore may be macros. PORTABILITY
The XSI Curses standard, Issue 4, describes these functions (adding the const qualifiers). The SVr4 docs merely say under scr_init that the dump data is also considered invalid "if the time-stamp of the tty is old" but do not de- fine "old". SEE ALSO
curses(3X), curs_initscr(3X), curs_refresh(3X), curs_util(3X), system(3) curs_scr_dump(3X)
All times are GMT -4. The time now is 03:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy