solaris

Storing openssl file digest as shell variable?

 ̄綄美尐妖づ 提交于 2019-12-08 13:07:22
问题 I am executing the below command in bash filehash=`openssl dgst -sha1 $filename` When I echo $filehash I get this SHA1(myfile.csv)= bac9c755bac9709fa8966831d1731dff07e28e6c How do I only get the hash value stored and not the rest of the string i.e. bac9c755bac9709fa8966831d1731dff07e28e6c Thanks 回答1: Through sed , filehash=`openssl dgst -sha1 $filename | sed 's/^.*= //'` It removes all the characters upto the = (equal symbol followed by a space). 回答2: In a lot of ways with pure Bash, e. g. by

Solaris linker equivalent to the GNU LD --export-dynamic flag

血红的双手。 提交于 2019-12-08 07:29:25
问题 Like the question says: We are building on Linux using the GNU linker, and on Solaris using the solaris ld . GNU ld supports the --export-dynamic flag, which: When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. What is the equivalent to this flag using the solaris linker? Is there an equivalent? 回答1: The Sun Studio linker ( ld ), by default, exports all

PKG_CHECK_MODULES breaking in solaris

橙三吉。 提交于 2019-12-08 04:09:00
问题 My project requires dependency of libxml2 am using autotools to check the dependencies & install the same. I declare the dependency of using the following macro in configure.ac echo -n "checking if libxml2 is present... " PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.19], [echo "yes (features requiring libxml2 enabled)" AC_DEFINE(HAVE_LIB_XML, 1, [define if libxml2 is present])], [echo "no"] ) The macro works as desired in GNU/Linux . But somehow it fails in Solaris with the following error

Force use gcc to compile (instead of cc) in ./configure under Solaris Sparc

左心房为你撑大大i 提交于 2019-12-07 21:15:17
问题 I want to build fossil code on Solaris. wget http://www.fossil-scm.org/index.html/tarball/tip.tar.xz tar xf tip.tar.xz ; cd tip.tar ./configure CC=gcc CXX=g++ C=gcc BCC=gcc # no error It will cause $make cc -o bld/translate ./src/translate.c /usr/ucb/cc: language optional software package not installed $which cc /usr/ucb/cc $which gcc /usr/local/bin/gcc $which g++ /usr/local/bin/g++ I'm sure my gcc/g++ are workable. After I add a dirty hack on replace the 'BCC = cc' line of Makefilewith 'BCC

Solaris scp Permission denied (gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive)

試著忘記壹切 提交于 2019-12-07 21:07:50
Solaris 在不同主机之间进行复制的时候出现Permission denied ,通常是目标服务器用户不具备在目标路径下写权限,或者目标服务器用户被禁止ssh登陆。 在Solaris中root用户默认是被禁止ssh登陆的,可以修改配置文件进行更改。 在目标服务器上: 1、修改/etc/ssh/sshd_config #vi /etc/ssh/sshd_config PermitRootLogin no 修改为 PermitRootLogin yes 2、重启ssh服务 1、杀死进程法 1)、查找服务 ps -ef | grep ssh 2)、杀掉服务 kill -9 516 3)、启动服务 /usr/lib/ssh/sshd 2、重启 svcadm restart ssh 3、查看ssh服务状态: svcs | grep ssh 显示:online Aug_07 svc:/network/ssh:default 关闭ssh服务(关闭完可以 svcs | grep ssh 查看一下状态): # svcadm disable svc:/network/ssh:default # svcs | grep ssh (无结果显示) 再启动ssh服务,用如下命令: # svcadm enable svc:/network/ssh:default 再检查一下状态,应该online了: #

How to reverse a string in ksh

允我心安 提交于 2019-12-07 18:55:13
问题 please help me with this problem, i have an array witch includes 1000 lines with number which are treated as strings and i want for all of them to reverse them one by one, my problem is how to reverse them because i have to use ksh or else with bash or something it would be so easy..... what i have now is this, but rev="$rev${copy:$y:1}" doesnt work in ksh. i=0 while [[ $i -lt 999 ]] do rev="" var=${xnumbers[$i]} copy=${var} len=${#copy} y=$(expr $len - 1) while [[ $y -ge 0 ]] do rev="$rev$

Improvements to this bash script to simulate “tail --follow”

巧了我就是萌 提交于 2019-12-07 18:45:00
问题 I need to remote tail log files such that the tailing continues working even when the file is rolled over. My attempts to do so, started by directly using the tail command over ssh: ssh root@some-remote-host tail -1000f /some-directory/application.log | tee /c/local-directory/applicaiton.log That allows me to filter through /c/local-directory/applicaiton.log locally using Otroslogviewer (which was the original purpose of trying to tail the log file locally). The above stops tailing when the

XML Transform results in FileNotFoundException

若如初见. 提交于 2019-12-07 18:12:41
问题 The earlier question I posted is closed because of lack of information. Please let me know if I am missing something here. The transformer seems to be adding file:/ to the beginning of my file path. I am working in a Solaris environment, and here is what happens when the transform gets applied: DOMSource sourcexml = new DOMSource(doc); StreamResult resultxml = new StreamResult(new File("file.xml")); transformer.transform(sourcexml, resultxml); The exception I get is: javax.xml.transform

javaws missing in Java 8 for Solaris

雨燕双飞 提交于 2019-12-07 15:39:55
问题 It looks like Oracle removed Java Web Start from Java 8 for Solaris. javaws isn't available anymore in Java 8u51. From the compatibility guide: The 64-bit binaries do not contain deployment tools such as Java Web Start and Java Plug-in, therefore desktop integration is no longer required. What do they mean with " required "? It's not possible anymore. It's not possible to launch a Web Start application on Solaris with Java 8. Does anyone know an alternate way (standard, no 3rd party stuff) to

Writing new line character in Java that works across different OS

别等时光非礼了梦想. 提交于 2019-12-07 11:02:30
问题 I have a Java program which generates a text file on a UNIX server. This text file is then sent to a customer's machine using other systems where it is supposed to be opened in notepad on Windows. As we are well aware that notepad will not be able to find a new line as it uses Windows CR LF. I am using System.getProperty("line.separator"); Is there another way of acheiving platform independece so that a file generated on UNIX can be displayed in Windows notepad with the proper formatting like