10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
2. Shell Programming and Scripting
Hi folks,
I have a list of variables as follows:
CDBTEST1
messdba1
sat11cru1
s12tgts1
sa12ss1
I need to remove the last '1' so I can use the remaining variables in a for loop:
CDBTEST
messdba
sat11cru
s12tgts
sa12ss
Something like this: (3 Replies)
Discussion started by: jonnyd
3 Replies
3. Shell Programming and Scripting
I am very new to shell scripting, current try to do a sorting of a text file in paragraphs with ksh script.
example:
File content:
A1100001 line 1 = "testing"
line 2 = something,
line 3 = 100
D1200003 line 1 = "testing"
line 2 = something,
line 3 = 100
B1200003 line 1 =... (3 Replies)
Discussion started by: gavin_L
3 Replies
4. Shell Programming and Scripting
Hi all!
I want to make a code to split sentences into paragraphs maybe
4-5 sentences into one <p>text</p>
there are no new lines in the text string
any ideas with AWK, SSH?
Thank you! (5 Replies)
Discussion started by: sanantonio7777
5 Replies
5. Shell Programming and Scripting
Hi all,
I want to extract some paragraphs out of a file under certain conditions.
- The paragraph must start with 'fmri'
- The paragraph must contain the string 'restarter svc:/system/svc/restarter:default'
My input is like that :
fmri svc:/system/vxpbx:default
state_time Wed... (4 Replies)
Discussion started by: Armoric
4 Replies
6. Shell Programming and Scripting
Friends,
I observed a peculiar problem in shell.
if I set a variable using standard input and backspace was used by the user, then the variable get ^? characters embedded in the variable.
###
echo "Enter value for X="
read X
echo $X
expr $X + 1
###
If the variable is echoed, then there... (3 Replies)
Discussion started by: sachinverma
3 Replies
7. Shell Programming and Scripting
Hi all,
First off, Thank you all for the knowledge I have gleaned from this site!
Deleting Records from a text file... sed paragraphs
The following code works nearly perfect, however each time it is run on the log file it adds a newline at the head of the file, run it 5 times, it'll have 5... (1 Reply)
Discussion started by: Festus Hagen
1 Replies
8. Shell Programming and Scripting
hi,
i am a SED newbie and i need some help. i have a log file as shown below. and i want to search specific Error Code, and fetch the whole paragraph.
...
...
.................
....ErrCode...
.................
...
...
...
.................
....ErrCode...
... (4 Replies)
Discussion started by: ipat
4 Replies
9. Shell Programming and Scripting
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Discussion started by: laser
6 Replies
10. Shell Programming and Scripting
Hi,
I am trying to filter out those paragraphs that contains 'CONNECT', 'alter system switch logfile'. That means say the input file is :
-------------------------------------------------------
Wed Jun 7 00:32:31 2006
ACTION : 'CONNECT'
CLIENT USER: prdadm
CLIENT TERMINAL:
Wed Jun 7... (7 Replies)
Discussion started by: cnlhap
7 Replies