Search Results

Search: Posts Made By: Grueben
5,059
Posted By Grueben
ksh loop to read input until QUIT
Hi
I'm looking to write a simple ksh loop reading user input (and write it to a file) until the user enters QUIT at which point I want it to continue.
Does anyone have an example of this type of...
1,204
Posted By Grueben
ksh to read input until QUI
Hello all
I'm looking to write a simple script (ksh/sh/bsh) to read user input and write it to a file (adding each time) until the user enters QUIT at which point I'm hoping to ask some more...
1,516
Posted By Grueben
Replace character string in txt file using input file(S)
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change...
Forum: Solaris 12-16-2015
1,938
Posted By Grueben
sed insert into line 1 via script
Hi
I am trying to run a sed command within a script..unfortunately it wasn't written on Solaris so doesn't work. Can anyone help with the correct coding please?
It is:
sed -i '1i...
1,322
Posted By Grueben
Oops yes forgot It was done using Vi editor ...
Oops yes forgot

It was done using Vi editor

Cheers
1,322
Posted By Grueben
Hi Rudi Yes I tried something and it worked. ...
Hi Rudi
Yes I tried something and it worked.
:g/STRING/.-1,-2,-3,-4,.d

Cheers
1,322
Posted By Grueben
Removing 3 consecutive lines from script
Hi
I need to remove three consecutive lines of code which appear multiple times during a script. Two of the lines also appear in other parts of the scripts and need to stay so I can't strip out the...
1,813
Posted By Grueben
Appending authorized_keys on multiple servers using ssh
Hi

I have an ssh 'for' loop script to login and put a key on multiple servers. I need to append a file on each server but the command which works ok from the prompt does not work via the script. I...
1,300
Posted By Grueben
See if file exists and if not create it
Hi,
I am using an expect script to roll out an ssh key to multiple servers. I have a problem as on some of them the authorized_keys file exists and on some it doesn't. Where it exists I need to >>...
1,694
Posted By Grueben
Cheers Scrutinizer that did help. With the doubel...
Cheers Scrutinizer that did help. With the doubel quotes it did manage to expand out the three different filename qualifiers. Trouble is now it says 'name too long' !
I think I'll just split this...
1,694
Posted By Grueben
Hi Scrutinizer We are using Linux / KSH93. ...
Hi Scrutinizer
We are using Linux / KSH93.
The script is invoked during a batch job. The batch ID has ksh as the default and the start of the script also has #!/usr/bin/ksh -x
Cheers
1,694
Posted By Grueben
Cheers RudiC I'll look into that
Cheers RudiC I'll look into that
1,694
Posted By Grueben
Help with ksh Script not resolving '@' in ls command
Hi all,
We've been trying to find a way to get a command to work within a ksh with no success.
We are attempting to list various files with different hlq's like this
ls...
1,390
Posted By Grueben
I tried this one and it renamed every file in the...
I tried this one and it renamed every file in the directory ! Luckily I tested it in my $home first !

Apologies should have clarified this is a shared filesystem - not just the ones I want to...
1,390
Posted By Grueben
Command / script to partially rename file
Hi
I have numerous files names
product_host_result_B1000842.txt
product_host_result_B1000847.txt
product_host_result_C1000842.txt
product_host_result_C1000848.txt

etc. I need them renamed so...
3,156
Posted By Grueben
Rename scripts using xargs/sed
Morning all

I've got loads of scripts but the names are too long! I've stuck the list in a flat file (names) and I'm trying to read that in line by line and create the new names (in to directory...
2,206
Posted By Grueben
Thanks Pamu but it doesn't work for what I want...
Thanks Pamu but it doesn't work for what I want as I can't pass the $1 until I've been shown the options.
2,206
Posted By Grueben
Thanks I'll have a look but I don't really...
Thanks I'll have a look but I don't really understand it !
2,206
Posted By Grueben
How to read in a part of an echo line?
Hello,
I have a very basic script

#!/usr/bin/ksh
while
print ' '
print ' 1. View Command History '
print ' 2. List files in current Directory '
read opt'?Enter...
1,426
Posted By Grueben
Script to ftp in to linux then pass reply
Hello,
I have an ftp loop script which I was going to use to login to various Linux systems but as It's my first connection I'm being prompted to add it to the known_hosts. Can this script be...
2,196
Posted By Grueben
telnet echoing 'trying ip' but no port number
Hi,
Well this is probably a silly one that I should know...but I don't !
I'm telnetting to various ports from a shell script and the telnet is echoing back that it's 'trying xxx.xx.xx.xx...' but...
1,287
Posted By Grueben
How do unix file lenghts work?
Hello,

Can someone tell me how unix works out file lenghts please? If I'm ftp'ing a file from a mvs mainframe to a unix box will the file be replicated line by line? I'm looking at the file on the...
2,549
Posted By Grueben
Hi RudiC, The missing '\' was unrelated...it...
Hi RudiC,
The missing '\' was unrelated...it turned out to be a basic permissions problem which I'd overlooked!
2,549
Posted By Grueben
What does the '\' in find -exec command
Hi,
I have two scripts that remove files. One works fine and is coded
find -name "syst*" -mtime +1 -exec rm {} \;

The other is almost the same - only thing missing is the '\'. On that script...
3,944
Posted By Grueben
Thanks...I thought it was weird that it didn't...
Thanks...I thought it was weird that it didn't wok but I've sussed it out now - I think I didn't have the correct PATH set in my profile so it couldn't find uname...
Showing results 1 to 25 of 102

 
All times are GMT -4. The time now is 09:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy