Unix/Linux Go Back    

Showing results 1 to 19 of 19
Search took 0.01 seconds.
Search: Posts Made By: primp
Forum: Shell Programming and Scripting Linux 09-19-2008
Replies: 8
Views: 11,758
Posted By primp
#!/bin/sh A='text1,text2,text3' echo $A...

#!/bin/sh

A='text1,text2,text3'

echo $A | sed -e 's/,/\n\t\t/g'


Produces the following:

text1
Forum: Shell Programming and Scripting Linux 09-19-2008
Replies: 8
Views: 11,758
Posted By primp
This is in response to the original question, you...

This is in response to the original question, you said to use "tr" to add newline but I can't seem to get "tabs" to also be added?

So I get an output with a single tab, and the rest are not...
Forum: Shell Programming and Scripting Linux 09-19-2008
Replies: 8
Views: 11,758
Posted By primp
Oh I can't believe I forgot about tr. ...

Oh I can't believe I forgot about tr.

Although, this works, I can only get it to recognize a newline but can't combine with that a newline+few tabs?

I also have a string that in the form of:
...
Forum: Shell Programming and Scripting Linux 09-19-2008
Replies: 8
Views: 11,758
Posted By primp
Parsing string using specific delimiter

Hi,

I'm wondering what is the best way to parse out a long string that has a specific deliminator and outputting each token between the delim on a newline?

i.e. input
text1,text2,text3,tex4
...
Forum: Shell Programming and Scripting Linux 06-14-2008
Replies: 4
Views: 13,709
Posted By primp
Unfortunately this has been discussed and for...

Unfortunately this has been discussed and for now, that is the method of getting the info we need. We looked at a local service account but there were some against it. I agree, it should be a local...
Forum: Shell Programming and Scripting Linux 06-14-2008
Replies: 4
Views: 13,709
Posted By primp
Interesting .... I'll give this a try on Monday...

Interesting .... I'll give this a try on Monday morning. Thanks
Forum: Shell Programming and Scripting Linux 06-14-2008
Replies: 4
Views: 13,709
Posted By primp
Script that Redirect SSH output via cron

Hi,

I have a script that's being called via a crontab which is a wrapper script that creates a log for the script that gets executed. Within the script that gets executed, it also run's...
Forum: Shell Programming and Scripting Linux 05-21-2008
Replies: 3
Views: 17,579
Posted By primp
You can do something as the following, you can...

You can do something as the following, you can also add additional logic to force a user to enter good input, so the script does not exit, but I'll leave that to you.


#!/bin/sh

echo "What...
Forum: Shell Programming and Scripting Linux 05-20-2008
Replies: 1
Views: 2,741
Posted By primp
You've sort of answered you question, you...

You've sort of answered you question, you substituted $1 which is the first command line argument to executing your script.

i.e.
# ./myscript.sh option1

$1 = option1

To verify you an do...
Forum: Shell Programming and Scripting Linux 05-15-2008
Replies: 9
Views: 20,243
Posted By primp
You're just appending by using the redirect...

You're just appending by using the redirect output (>>), you need to look at sed, and search for the area where you want the chunk of text. Man sed or look at examples online to do so.
Forum: Shell Programming and Scripting Linux 05-12-2008
Replies: 6
Views: 13,029
Posted By primp
Which JDK are you trying to install, do you have...

Which JDK are you trying to install, do you have the version you're trying to automate the install? I can try it on my dev box and see what I come up with
Forum: Shell Programming and Scripting Linux 05-09-2008
Replies: 9
Views: 20,243
Posted By primp
Sure, you can make it do anything. If you're...

Sure, you can make it do anything. If you're looking at building a full ks.cfg from the ground up, you can add more questions and output to a new ks.cfg. If you have an existing template you want to...
Forum: Shell Programming and Scripting Linux 05-09-2008
Replies: 6
Views: 13,029
Posted By primp
Last time I checked, it's a general user...

Last time I checked, it's a general user agreement, once you page down it'll ask if you want to accept. If you pass in "y\n" it should page through that portion. I haven't done an installation...
Forum: Shell Programming and Scripting Linux 05-09-2008
Replies: 6
Views: 13,029
Posted By primp
This task is not difficult, you would normally...

This task is not difficult, you would normally install jdk on linux by doing something like:

./jdk-installer-bin

It'll prompt for you to accept the EULA which just requires "y" along with...
Forum: Shell Programming and Scripting Linux 05-08-2008
Replies: 9
Views: 20,243
Posted By primp
[root@atlantis ~]# cat generateKickstartConfig.sh...

[root@atlantis ~]# cat generateKickstartConfig.sh


#!/bin/sh

#define outputfile
KS_CONFIG=ks.cfg

echo -e "Starting Kickstart Configuration Generator Script ...\n"
Forum: Shell Programming and Scripting Linux 04-16-2008
Replies: 1
Views: 973
Posted By primp
If you're on a linux system, you could use the...

If you're on a linux system, you could use the command:

dos2unix [file] > output_file
Forum: Shell Programming and Scripting Linux 03-16-2008
Replies: 4
Views: 12,222
Posted By primp
Thank you, I was going down that route of using...

Thank you, I was going down that route of using the "5 minutes ago" but didn't realize it was support to be part of the input string, that was where I got confused on and I did not couldn't find an...
Forum: Shell Programming and Scripting Linux 03-16-2008
Replies: 4
Views: 12,222
Posted By primp
I was taking a look at those links and I saw that...

I was taking a look at those links and I saw that you could pass in a parameter such as the following:

date -d "2008-03-15 11:40" --date="5 minutes ago" +%F==%I:%M

Though the output was:
...
Forum: Shell Programming and Scripting Linux 03-15-2008
Replies: 4
Views: 12,222
Posted By primp
Processing a log file based on date/time input and the date/time on the log file

Hi,

I'm trying to accomplish the following and would like some suggestions or possible bash script examples that may work

I have a directory that has a list of log files that's periodically...
Showing results 1 to 19 of 19

 


All times are GMT -4. The time now is 01:36 PM.