10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Ok, so I'm playing around with delimters and reading files. and I came across this behaviour that I thought was a bit odd, regarding how the set command takes values... If I run this: IFS=$'-' #Assigns the - as the default delimiter for bash set I-love-my-gf-a-lot #uses set to put a bunch of... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies
2. Shell Programming and Scripting
Hello masters of scripting,
I've been working to develop some basic monitoring scripts. I have solved one problem, but want to know how to solve the other.
I have a script that runs locally to create an output file with the Linux system kernel paramters, preceeded by the system name:
... (2 Replies)
Discussion started by: LinuxRacr
2 Replies
3. Shell Programming and Scripting
I am using bash and resetting IFS as below when reading the command line arguments. I do this so I can call my script as in Ex1.
Ex1: ./synt2d-ray3dmod.bash --xsrc=12/20/30
This allows me to split both sides so that when I do "shift"
I can get 12/20/30
What I do not understand is... (21 Replies)
Discussion started by: kristinu
21 Replies
4. Shell Programming and Scripting
Hi,
while ; do
echo "Please enter "
read enter
yyyy=${enter:0:4}
mm=${enter:5:2}
dd=${enter:8:2}
result=`validateDate $yyyy $mm $dd`
When does the loop keeping repeating till?? till 1 is equal to 1?
what does this mean "${enter:0:4}" .The 0 and 4 part??
... (3 Replies)
Discussion started by: sid22
3 Replies
5. Shell Programming and Scripting
hi i am a learner
can some explain "export IFS=$(echo "\n\t\a")"
i am not able to understand the functionality
please help
thanks
Satya (1 Reply)
Discussion started by: Satyak
1 Replies
6. Shell Programming and Scripting
Hi,
I have modified the IFS variable in the K shell program and with in the program i want to reset to the default one. How do i reset the same.
e.g
in the begining of the program IFS is default
in the middle i changed it to
IFS="|"
and again i want the default value for the IFS.
... (2 Replies)
Discussion started by: vijaykrc
2 Replies
7. Shell Programming and Scripting
=================================================
#!/bin/sh
HOST=eux091
if && grep -q $HOST /etc/maestab
then
IFS=:
grep -v -e "^#" -e "^$" /etc/maestab | grep $HOST | \
read HOST MAESTRO_BIN FLAG MAESTRO_USER
echo $MAESTRO_BIN
MAESTRO_HOME=`dirname $MAESTRO_BIN`... (7 Replies)
Discussion started by: Awadhesh
7 Replies
8. UNIX for Dummies Questions & Answers
Hi!
I am working in korn shell. I want to reset the dimiliter for the set command to "|" but instead of a command prompt return I am getting something as below
After issuing the command I am getting this....as if the shell is expecting something else. Can anybody suggest what's the problem.
... (2 Replies)
Discussion started by: udiptya
2 Replies
9. UNIX for Dummies Questions & Answers
How can I set the value for IFS variable (2 Replies)
Discussion started by: mahabunta
2 Replies
10. Shell Programming and Scripting
Hi,
I have a while read loop that reads files in a directory and process. The files have spaces in between, so I have the IFS=\n to to read the whole line as one file name.
The read works fine but I have a problem with another variable that I set in the beginning of the script. The variable... (1 Reply)
Discussion started by: pvar
1 Replies