Sponsored Content
Top Forums Shell Programming and Scripting Foreach .gz file in a directory -- Not working Post 302898987 by IB_88 on Friday 25th of April 2014 10:18:13 AM
Old 04-25-2014
that is typing mistake. I am using .gz
 

9 More Discussions You Might Find Interesting

1. Programming

Getting present working directory

How can I get the present working directory in unix system using c programming and stored it in a string ?? (0 Replies)
Discussion started by: winsonlee
0 Replies

2. UNIX for Dummies Questions & Answers

working directory shown

Hi, How do I get my working directory always shown in the unix editor? i.e if I am now at /Home/abc/xyz/, I want to see this absolute path displayed ( and now only display when I type pwd). thanks for the kind help. Regrads (3 Replies)
Discussion started by: swchee
3 Replies

3. HP-UX

how could I get process working directory

how could I use c program to get HP UX process working directory (1 Reply)
Discussion started by: alert0919
1 Replies

4. Shell Programming and Scripting

Shell script: foreach file -> targzip

Hi there, I need some help with a shell script (I'm no sh script expert, but I hope this will explain how I want my script):dir = /home/user/files/ foreach(*.jpg file in $dir) { tar -cf $file(-.jpg).tar $file;gzip $file(-.jpg).tar } mv -f $dir*tar.gz /home/user/pictures/ Thanks for any... (12 Replies)
Discussion started by: JKMlol
12 Replies

5. Shell Programming and Scripting

put working directory in file

how to put pwd in my file my working directory is /usr/my_dir below my file aaaaaa bbbbbb so output file become /usr/my_dir aaaaaa bbbbbb (2 Replies)
Discussion started by: zulabc
2 Replies

6. Shell Programming and Scripting

foreach loop working in terminal but not in the script

Hi, I am new here I have used the forums a long time to search for things they are very helpful. I have unfortunately used up all my resources (professors, grad students) and need some help. I have this very simple piece of code (using to isolate the problem) in a csh script: #!/bin/csh... (12 Replies)
Discussion started by: bflinchum
12 Replies

7. UNIX for Dummies Questions & Answers

Foreach loop that skips the header line of a file (csh)

Hello all, I'm working on a foreach loop to compare a couple sets of data. However, each datafile includes a header row. I'm wondering if it is possible to tell the foreach loop to skip the first line of data. I've been using the basic code as follows: foreach line ("`file.csv`") set... (2 Replies)
Discussion started by: meteorologistks
2 Replies

8. Shell Programming and Scripting

PERL foreach & open not working together

My script is as below: my $tile_list = `egrep "FCFP_TILE_LIST.*=" ${BudgetDir}/tile.params | sed -e 's/FCFP_TILE_LIST//' | sed -e 's/=//'`; print "Tile List = ".$tile_list."\n"; my @tiles = split(/\s+/, $tile_list); $unconst_out = "${DestDir}/Unconstrained_ports.rpt"; $check_tim_out =... (2 Replies)
Discussion started by: kuchi7
2 Replies

9. UNIX for Dummies Questions & Answers

Reading foreach variable from a text file

Hello, I have a text file named "foreach.txt" which reads like --- foreach cal ( 1 2 3 4 5 ) I am using a simple script which looks like --- #!/bin/tcsh foreach cal (1 2 3 4 5) echo "$cal" end Is it possible to modify the script in such a way that instead of writing foreach cal (1... (6 Replies)
Discussion started by: Indra2011
6 Replies
pty(4)							     Kernel Interfaces Manual							    pty(4)

Name
       pty - pseudoterminal driver

Syntax
       pseudo-device pty[n]

Description
       The  driver  provides  support for a device-pair termed a pseudoterminal.  A pseudoterminal is a pair of character devices, a master device
       and a slave device.  The slave device provides processes with an interface identical to	that  described  in  However,  whereas	all  other
       devices	that  provide  the  interface described in have a hardware device of some sort behind them, the slave device has, instead, another
       process manipulating it through the master half of the pseudoterminal.  That is, anything written on the master	device	is  given  to  the
       slave  device as input and anything written on the slave device is presented as input on the master device.  The slave device can be opened
       multiple times, while the master half can be opened only once.

       If no optional n value is given defining the number of pseudoterminal pairs to be configured, 16 pseudoterminal pairs are configured.   All
       pseudoterminal  lines should have a corresponding entry in the /etc/ttys file.  This must be done to insure that logins that use pseudoter-
       minals will be tracked in the utmp and wtmp files.

       The following calls apply only to pseudoterminals:

       TIOCSTOP
	      Stops output to a terminal (for example, like typing CTRL/S).  Takes no parameter.

       TIOCSTART
	      Restarts output (stopped by TIOCSTOP or by typing CTRL/S).  Takes no parameter.

       TIOCPKT
	      Enable/disable packet mode.  Packet mode is enabled by specifying (by reference) a nonzero parameter and disabled by specifying  (by
	      reference)  a  zero  parameter.	When applied to the master side of a pseudoterminal, each subsequent from the terminal will return
	      data written on the slave part of the pseudoterminal preceded by a zero byte (symbolically defined as  TIOCPKT_DATA),  or  a  single
	      byte reflecting control status information.  In the latter case, the byte is an inclusive-or of zero or more of the bits:

	      TIOCPKT_FLUSHREAD
		     whenever the read queue for the terminal is flushed.

	      TIOCPKT_FLUSHWRITE
		     whenever the write queue for the terminal is flushed.

	      TIOCPKT_STOP
		     whenever output to the terminal is stopped by typing CTRL/S.

	      TIOCPKT_START
		     whenever output to the terminal is restarted.

	      TIOCPKT_DOSTOP
		     whenever the stop character is CTRL/S and the start character is CTRL/Q.

	      TIOCPKT_NOSTOP
		     whenever the start and stop characters are not CTRL/S and/or CTRL/Q.

	      This  mode  is used by and to implement a remote-echoed, locally flow-controlled (using CTRL/S or CTRL/Q, or both) remote login with
	      proper back-flushing of output.  It can be used by other similar programs.

       TIOCREMOTE
	      A mode for the master half of a pseudoterminal, independent of TIOCPKT.  This mode causes input to the  pseudoterminal  to  be  flow
	      controlled  and  not  input edited (regardless of the terminal mode).  Each write to the control terminal produces a record boundary
	      for the process reading the terminal.  In normal usage, a write of data is like the data typed as a line on the terminal; a write of
	      0  bytes	is  like  typing  an end-of-file character.  TIOCREMOTE can be used when doing remote line editing in a window manager, or
	      whenever flow-controlled input is required.

       TIOCMASTER
	      Allows the master to have complete control over the pseudoterminal and causes the slave side to sleep until the master  relinquishes
	      control.	This is useful in preventing changes on the pseudoterminal from going undetected and being reset by the master.

Files
       (master pseudoterminals)

       (slave pseudoterminals)

See Also
       tty(4), MAKEDEV(8)

																	    pty(4)
All times are GMT -4. The time now is 06:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy