Sponsored Content
Top Forums Shell Programming and Scripting Cannot open txt file in UNIX using cat utility Post 302736819 by Subhasis on Wednesday 28th of November 2012 02:45:10 AM
Old 11-28-2012
@pamu : That works...Great....Thank U. Smilie

@Jotne : I am able to rename the file starting with '#' as well as could create a file starting with '#'. I created the file using vi editor though, not by any source prog.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep/cat/more -- search in a txt file and display content from a specific "keyword"

Hi, I have a .txt file Sample: ===================== NEXT HOST ===================== AEADBAS001 ip access-list extended BLA_Incoming_Filter ip access-list extended BLA_Outgoing_Filter access-list 1 permit xxxxxxxxxxxxxx access-list 2 permit xxxxxxxxxxxxxx =====================... (4 Replies)
Discussion started by: I-1
4 Replies

2. Shell Programming and Scripting

for i in `cat myname.txt` && for y in `cat yourname.txt`

cat myname.txt John Doe I John Doe II John Doe III ----------------------------------------------------------------------- for i in `cat myname.txt` do echo This is my name: $i >> thi.is.my.name.txt done ----------------------------------------------------------------------- cat... (1 Reply)
Discussion started by: danimad
1 Replies

3. UNIX for Dummies Questions & Answers

CAt utility in java

Hello friends, could you please advice me of how to traslate this program written in C to java? #include <cstdio> main( ){ char c; c = getchar( ); while (c != EOF) { putchar(c); c = getchar( ); } } I am supposed to test the difference in time between compiling the C... (2 Replies)
Discussion started by: bentaboha87
2 Replies

4. Shell Programming and Scripting

Unix / Linux Dialog Utility - how to open 2+ more dialog windows ?

Hi, example of Unix / Linux dialog utility is below. I am going to use dialog as simple GUI for testing of a modem. So I need to combine some dialog boxes into one. I need to have input box, output box, info box, dialog box, radiobox as in any standard program with graphical user... (2 Replies)
Discussion started by: jack2
2 Replies

5. Shell Programming and Scripting

cat vs head vs readline get variable from txt file

I have a file with a single filename in it, which I want to assign to a BASH variable, so I've been trying: c=$(head -1 somefile) echo $c which outputs correctly, but them when I do ... somecommand $c it says it can't find the file, is that because it's grabbing the whole line, and... (5 Replies)
Discussion started by: unclecameron
5 Replies

6. UNIX for Dummies Questions & Answers

Help on cat filelist.txt |xargs -n1 find

I am trying to find all the files listed in a filelist.txt. Why cant I use something like this cat filelist.txt | xargs -n1 find $path (2 Replies)
Discussion started by: dragonpoint
2 Replies

7. UNIX for Dummies Questions & Answers

file hashing utility in unix

I am looking for a utility that does file hashing in unix. ...Please let me know of any good easy to use utility (3 Replies)
Discussion started by: jbjoat
3 Replies

8. UNIX for Advanced & Expert Users

cat can not open file

Hi All, I have stumbled upon very unique issue. In my script I am doing cat file and then greping and cutting so as to assign the value to variable. My file is, <mxc_tl_load_extractdata_prop.bsh> DB_USER=test_oper hostname=xxx FTP_USER=test1_operate MAIL_LIST=xxx@yyy.com... (1 Reply)
Discussion started by: paragd
1 Replies

9. UNIX for Beginners Questions & Answers

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (1 Reply)
Discussion started by: sudiptabhaskar
1 Replies

10. Shell Programming and Scripting

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window, vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (3 Replies)
Discussion started by: sudiptabhaskar
3 Replies
chpst(8)						      System Manager's Manual							  chpst(8)

NAME
chpst - runs a program with a changed process state SYNOPSIS
chpst [-vP012] [-u user] [-U user] [-b argv0] [-e dir] [-/ root] [-n inc] [-l|-L lock] [-m bytes] [-d bytes] [-o n] [-p n] [-f bytes] [-c bytes] prog DESCRIPTION
prog consists of one or more arguments. chpst changes the process state according to the given options, and runs prog. OPTIONS
-u [:]user[:group] setuidgid. Set uid and gid to the user's uid and gid, as found in /etc/passwd. If user is followed by a colon and a group, set the gid to group's gid, as found in /etc/group, instead of user's gid. If group consists of a colon-separated list of group names, chpst sets the group ids of all listed groups. If user is prefixed with a colon, the user and all group arguments are interpreted as uid and gids respectivly, and not looked up in the password or group file. All initial supplementary groups are removed. -U [:]user[:group] envuidgid. Set the environment variables $UID and $GID to the user's uid and gid, as found in /etc/passwd. If user is followed by a colon and a group, set $GID to the group's gid, as found in /etc/group, instead of user's gid. If user is prefixed with a colon, the user and group arguments are interpreted as uid and gid respectivly, and not looked up in the password or group file. -b argv0 argv0. Run prog with argv0 as the 0th argument. -e dir envdir. Set various environment variables as specified by files in the directory dir: If dir contains a file named k whose first line is v, chpst removes the environment variable k if it exists, and then adds the environment variable k with the value v. The name k must not contain =. Spaces and tabs at the end of v are removed, and nulls in v are changed to newlines. If the file k is empty (0 bytes long), chpst removes the environment variable k if it exists, without adding a new variable. -/ root chroot. Change the root directory to root before starting prog. -n inc nice. Add inc to the nice(2) value before starting prog. inc must be an integer, and may start with a minus or plus. -l lock lock. Open the file lock for writing, and obtain an exclusive lock on it. lock will be created if it does not exist. If lock is locked by another process, wait until a new lock can be obtained. -L lock The same as -l, but fail immediately if lock is locked by another process. -m bytes limit memory. Limit the data segment, stack segment, locked physical pages, and total of all segment per process to bytes bytes each. -d bytes limit data segment. Limit the data segment per process to bytes bytes. -o n limit open files. Limit the number of open file descriptors per process to n. -p n limit processes. Limit the number of processes per uid to n. -f bytes limit output size. Limit the output file size to bytes bytes. -c bytes limit core size. Limit the core file size to bytes bytes. -v verbose. Print verbose messages to standard error. This includes warnings about limits unsupported by the system. -P pgrphack. Run prog in a new process group. -0 Close standard input before starting prog. -1 Close standard output before starting prog. -2 Close standard error before starting prog. EXIT CODES
chpst exits 100 when called with wrong options. It prints an error message and exits 111 if it has trouble changing the process state. Otherwise its exit code is the same as that of prog. EMULATION
If chpst is called as envdir, envuidgid, pgrphack, setlock, setuidgid, or softlimit, it emulates the functionality of these programs from the daemontools package respectively. SEE ALSO
sv(8), runsv(8), setsid(2), runit(8), runit-init(8), runsvdir(8), runsvchdir(8) http://smarden.org/runit/ http://cr.yp.to/daemontools.html AUTHOR
Gerrit Pape <pape@smarden.org> chpst(8)
All times are GMT -4. The time now is 05:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy