05-21-2005
Hi Dta,
I too have same problem...i am getting "line" value into "choice" and not getting the input from terminal.
I am looking for a soultion to use "read" twice in a while loop.
Thanks...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
Does anyone have a script that will allow me to stop inside a while read loop.
I want to pause the loop until a enter is pressed.
e.g.
While read line
do
echo something
if LINECOUNT > 40
then
read ENTER?"PRESS ENTER TO CONT..."
... (3 Replies)
Discussion started by: jhansrod
3 Replies
2. Shell Programming and Scripting
Hi,
'read' command is not working inside the while loop, How can I solve this?
Rgds,
Sharif. (2 Replies)
Discussion started by: sharif
2 Replies
3. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
4. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
5. Shell Programming and Scripting
Hi,
I am reading file records inside a while loop,
and want to update the record when certain condition is met.
How can I update a file while being read?
I want to avoid using temporary files, copy, rename, ...
while IFS=',' read -r f1 f2
do
function(f1,f2)
if
then
<add... (1 Reply)
Discussion started by: ysrini
1 Replies
6. Shell Programming and Scripting
Hello,
I have a set of files Xfile0001 - Xfile0021, and the content of this files (one at a time) needs to be printed between some line (lines start with word "Generated") that I am extracting from another file called file7.txt and all the output goes into output.txt. First I tried creating a for... (5 Replies)
Discussion started by: jaldo0805
5 Replies
7. UNIX for Dummies Questions & Answers
I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off....
I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
Discussion started by: xxhieixx
3 Replies
8. Shell Programming and Scripting
Hi there guys!
I was trying to do:
while read line; do
if ; then
read -p "Press Enter to continue..."
cont=0
fi
echo $line
let cont++
done < file.txt
However, I have read that the read -p would not work in a while loop...
I was wondering if there is any other way to... (2 Replies)
Discussion started by: rplae
2 Replies
9. Shell Programming and Scripting
Hi,
This query is a part of a much more lengthy script.
I wish to look for all the files in a folder named "data" which in this case has two files i.e. plan.war and agent.properties. For all the files found under data I wish to ask the user as to where they wish copy the files to.
Below,... (14 Replies)
Discussion started by: mohtashims
14 Replies
10. Shell Programming and Scripting
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
LEARN ABOUT DEBIAN
mount.crypt
mount.crypt(8) pam_mount mount.crypt(8)
Name
mount.crypt - mount a dm-crypt encrypted volume
Syntax
mount.crypt [-nrv] [-o options] device directory
Options
-o options
Set further mount options. mount.crypt will take out its own options it recognizes and passes any remaining options on to the under-
lying mount program. See below for possible options.
-n Do not update /etc/mtab. Note that this makes it impossible to unmount the volume by naming the container - you will have to pass
the mountpoint to umount.crypt.
-r Set up the loop device (if necessary) and crypto device in read-only mode. (The mount itself will necessarily also be read-only.)
Note that doing a remount using `mount /mnt -o remount,rw` will not make the mount readwrite. The crypto and loop devices will have
to be disassociated first.
-v Turn on debugging and be a bit more verbose.
Mount options
cipher The cryptsetup cipher used for the encrypted volume. This option is mandatory for PLAIN (non-LUKS) volumes. pmt-ehd(8) defaults to
creating volumes with "aes-cbc-essiv:sha256" as a cipher.
crypto_name
Select the name for the crypto device (optional). This option is currently only usable with dm-crypt systems.
fsck Run fsck on the container before mounting it.
fsk_cipher
The OpenSSL cipher used for the filesystem key. The special keyword "none" can be used to bypass decryption and pass the file con-
tents directly to libcryptsetup.
fsk_hash
The OpenSSL hash used for producing key and IV.
fstype The exact type of filesystem in the encrypted container. The default is to let the kernel autodetect.
hash The cryptsetup hash used for the encrypted volume. This defaults to no hashing, because pam_mount assumes EHD volumes with strong
and simple fskey generation.
keyfile
The path to the key file. This option is mandatory for "normal" crypto volumes and should not be used for LUKS volumes.
remount
Causes the filesystem to be remounted with new options. Note that mount.crypt cannot switch the underlying loop device (if applies)
or the crypto device between read-only and read-write once it is created; only the actual filesystem mount can be changed, with lim-
its. If the loop device is read-only, the crypto device will be read-only, and changing the mount to read-write is impossible. Sim-
ilarly, going from rw to ro will only mark the mount read-only, but not the crypto or loop device, thus making it impossible to set
the filesystem the crypto container is located on to read-only.
ro Same as the -r option.
verbose
Same as the -v option.
Obsolete mount options
This section is provided for reference.
loop This option used to set up a loop device, because cryptsetup(8) expects a block device. The option is ignored because mount.crypt
can figure this out on its own.
pam_mount 2011-12-15 mount.crypt(8)