9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So i have a script that is like this:
#!/bin/sh
VARA="elementary 1
elementary 2
nursery A
nursery B
highschool AZ"
echo "${ContentOfADifferentSCRIPT}" | sh
i do not have control over the script that is inside the variable "${ContentOfADifferentSCRIPT}".
however, i know that the... (3 Replies)
Discussion started by: SkySmart
3 Replies
2. UNIX for Dummies Questions & Answers
Can someone post a "for dummies" explanation on how subshells work?
Let's say I want to get a couple of pieces of info from the /etc/passwd file and set them as variables to be echo'd back after all data is gathered. something like
for i in ${grep 5000 /etc/passwd | cut -d : -f 5}... (5 Replies)
Discussion started by: flyboynm
5 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
This is the basic question.
I have read many books which advised to avoid creating sub shells.
e.g: use wc -l<filename
rather than using cat file|wc -l.
So, how to identify whether a command creates subshell or not?
so,is it better to use tail -n+1 file in stead of using cat.... (3 Replies)
Discussion started by: pandeesh
3 Replies
4. AIX
periodically my oracle 11.2.0.1 listener process 'tnslsnr' seems to crash and disappear ( I am using an AIX 6.1 unix platform ). When this happens I am able to restart my listener ok. However when this happens there is is no stop recorded in my listener log (as there normally would be - hence why I... (1 Reply)
Discussion started by: jimthompson
1 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone! I have something like the following records in a file:
ID: 1
Name: A
Age: 23
ID: 2
Name: B
ID: 1
Activity: Climbing
ID: 3
Name: C
ID: 3
Activity: Skating
I want to capture the records where the field Age exists AND the records that have the same ID as the one... (4 Replies)
Discussion started by: Atrisa
4 Replies
6. Shell Programming and Scripting
I have the following script running with nohup on one of my servers:
#!/bin/bash
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#set log number
#i=1
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
#Check if log exits, if so incrememnt log number up so we don't clobber
#while... (8 Replies)
Discussion started by: DeCoTwc
8 Replies
7. Shell Programming and Scripting
The typical line of the input file is as follows,
123|abcde|"xyz|mn"|ghelosa|3455hello|
The delimiter is |. I need to change it to another delimiter, say ~. For the above line, the output should be:
123~abcde~xyz|mn~ghelosa~3455hello~
The challenge is when | appears in a field, it... (2 Replies)
Discussion started by: derekxu
2 Replies
8. UNIX for Dummies Questions & Answers
I have a file like this:
111 AA 100.00
111 AA 200.00
TOTALS 2 300.00
111 285.00
111 ... (0 Replies)
Discussion started by: nickg
0 Replies
9. Shell Programming and Scripting
Hi all,
I have a shell script which calls other shell scripts, depending on the input.
Within a.sh, I have a command which calls b.sh (ie. ksh b.sh)
Normally, we use the exit function to terminate a shell. However, if I choose to call exit from b.sh, I will return to the parent shell who... (4 Replies)
Discussion started by: rockysfr
4 Replies