Search Results

Search: Posts Made By: primp
14,714
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
text2
text3

Still have the offset of the tab, but now...
14,714
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...
14,714
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:
...
14,714
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
...
14,727
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...
14,727
Posted By primp
Interesting .... I'll give this a try on Monday...
Interesting .... I'll give this a try on Monday morning. Thanks
14,727
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...
18,654
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...
3,289
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...
25,012
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.
17,143
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
25,012
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...
17,143
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...
17,143
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...
25,012
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"

echo -en "\tWhat is...
1,273
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
13,912
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...
13,912
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:
...
13,912
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 08:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy