ahhhhh haha. i should have forseen this. this is normal here. the problem is you are in a subshell!
everything done by | while read is not executed in same context. this shows more clearly with variables:
this is same for exit!
You do not need to use ls and then read it. The shell can iterate over files:
This User Gave Thanks to neutronscott For This Post:
Hi,
I was trying to call "script <an ip add>" command from .profile file to log everything whenever anyone logs in to this user. I did the following at the end of .profile. 1) Extracted the IP address who logged in 2) Called script < ip add> . The problem I am facing is all, aliases etc. written... (3 Replies)
Hallo,
i need a Prompting read in my script:
read -p "Enter your command: " command
But i always get this Error:
-p: is not an identifier
When I run these in c-shell i get this error
/usr/bin/read: read: bad option(s)
How can I use a Prompt in the read command? (9 Replies)
Hi,
Using AIX 5.3 and Ksh.
/>ls -al /usr/bin/ksh
-r-xr-xr-x 5 bin bin 237420 Apr 10 2007 /usr/bin/ksh
/>
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have... (2 Replies)
So, I have an expect script (let's call it expect.exp) that takes 3 arguments. It logs into a remote server, runs a set of commands, then hands control over to the user by the "interact" command. If I call this script from the command line, it works properly.
Now I'd like to apply this script... (2 Replies)
I am trying to allow the user to be notified that the id has already taken from the file "record" and that the user has to contain a numerical figure as well. however when i run it, it will only stay at the please enter a number section and does not change. do u know where is the problem?
... (2 Replies)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT XFREE86
edit-patch
EDIT-PATCH(1) General Commands Manual EDIT-PATCH(1)NAME
edit-patch, add-patch - tool for preparing patches for Debian source packages
SYNOPSIS
edit-patch path/to/patch
add-patch path/to/patch
DESCRIPTION
edit-patch is a wrapper script around the Quilt, CDBS, and dpatch patch systems. It simplifies the process of preparing and editing patches
to Debian source packages and allows the user to not have to be concerned with which patch system is in use. Run from inside the root
directory of the source package, edit-patch can be used to edit existing patches located in debian/patches.
It can also be used to incorporate new patches. If pointed at a patch not already present, it will copy the patch to debian/patches in the
correct format for the patch system in use. Next, the patch is applied and a subshell is opened in order to edit the patch. Typing exit
or pressing Ctrl-d will close the subshell and launch an editor to record the debian/changelog entry.
edit-patch is integrated with the Bazaar and Git version control systems. The patch will be automatically added to the tree, and the
debian/changelog entry will be used as the commit message.
If no patch system is present, the patch is applied inline, and a copy is stored in debian/patches-applied.
add-patch is the non-interactive version of edit-patch. The patch will be incorporated but no editor or subshell will be spawned.
AUTHORS
edit-patch was written by Daniel Holbach <daniel.holbach@canonical.com>, Michael Vogt <michael.vogt@canonical.com>, and David Futcher
<bobbo@ubuntu.com>.
This manual page was written by Andrew Starr-Bochicchio <a.starr.b@gmail.com>.
Both are released under the terms of the GNU General Public License, version 3.
DEBIAN Debian Utilities EDIT-PATCH(1)