UNIX inquiry for 'awk'
Hello Everyone, May I ask for your help regarding one of the UNIX command “awk”. So I executed a script and the output looks like this (see below): output.txt Code: CONTRACTNAME...
View ArticleOutput in separate files
Hi all, i have the bash script for remote conection, Code: for hosts in $(cat /list); do ssh user1@$hosts "hostname"; done execute hostname command by all hosts and show standar ouput, how i can...
View ArticleCount The Number Of Delimiters using awk or better
What to know the way to count the number of delimiters in each record by ignoring the escape delimiters. Code: Sample Data: 12345678|ABN\|XYZ MED CHEM PTY. LTD.|C||100.00|22|AB"C\|Corp|"XYZ|CDEF"| I'm...
View ArticleMultiple begginer's problems
Hello! I started how to write scripts (basic one) in bash. I would like to post my problems here (i will edit topic if i will have any news problems) 1] i have a txt file like: 32323 4.2 12121 1.4 ......
View ArticleGet Hostname in UNIX like environment in Windows (Cgwin, UWin)
Hi, I'm using UWIN (from at&t - a cygwin like environment) in my personal computer to show Unix like environment to someone new to Unix. Though UWin has Ksh command box, wanted to show Putty to...
View ArticleMailing multiple PNG attachments using sendmail
Need assistance in using the below script and having multiple png file attachments in the same script . Your inputs are appreciated. I dont have uuencode , I use either mailx, sendmail, mpack . Code: (...
View ArticleSql ORA-00937: not a single-group group function
I'm trying to return only one row with the highest value for PCT_MAX_USED. Any suggestions? When I add this code, I get the ORA-00937 error. Code: trunc(max(decode( kbytes_max, 0, 0,...
View ArticleArbitrator for 2 nodes ocfs cluster
Is there any way to create a arbitrary node for ocfs2 on a virtual machine (others are physical servers) so it won't go panic when one of physical server goes down? This is for load balanced...
View ArticleUsing plink with sudo access
I have similar issue as mentioned in 167174-how-run-script-using-batch-file.html It works good, but the control is not coming back to source i tried adding exit to remote script. Thanks, Suresh
View ArticleHow to pad zeroes based on input string?
Hello everyone, I am comparing two floating point numbers by storing them in seperate files and then using difference command to verify,it is working fine. But I want to compare two values which will...
View ArticleConverting fixed width file to pipe delimiter in Linux(red-hat)
Hi, I am facing a typical scenario for AWK command . In HP- UNIX is behave as expected but in red hat linux same awk code is not give the same result. The below code is for convert the fixed width file...
View ArticleGrep lines before a pattern haivng some other pattern
Hi All, I am trying to fetch lines before a pattern, I got to know about -B flag in grep but we have to pass the number to get those lines before some pattern say (X), now what if I want to get line/s...
View ArticlePF refreshes dropping user connections
We often have to update our ipfilter rules on Solaris 11. Code: svcadm refresh ipfilter drops users every time (we're logged in via the global and then a zlogin to the zone in question). Is there any...
View ArticleHow to send mail (sendmail) for php mail()?
PHP mail() function doesn't work. Nor does sendmail: Code: loaded system configuration file /etc/msmtprc ignoring user configuration file /home/xi/.msmtprc: No such file or directory falling back to...
View ArticleNo Mac address present,
I have installed RHEL 6 in my new system. My sytem is physically also connected with network, but after successfully installing it is not detecting the network. I checked, there is no...
View ArticleGrep a pattern and print following n lines
Hi all, I am struck with the below requirement. I need to grep a particular pattern in a file and then print next n lines of it for further processing. I have used the below code Code: grep -A 3...
View ArticleNawk match regex of bash variable
Using a bash for loop to pass variables into a nawk loop to capture a string in an sftp log. Tried several different syntax methods to have the variable treated as a regex so the loop will capture the...
View ArticleUnex
Has anyone worked on unix projects where they see unix mis-spelled as unex or unyx in the workplace?
View ArticleBusybox search replacement for find
Hi, I am looking for a solution to find files in a folder and subfolders. Those files should be moved (some with spaces) when they were between 2015 Feb. 03 and 2014 Nov. 24. find . -type f -newermt...
View ArticleCp via NFS vs. scp yields unexpected difference
I have two Linux machines, Linux1 and Linux2. They both have two NFS mounts. We'll call them /scratch1 and /scratch2. And they both reside on the same NetApp filer. If I copy a 512Mb file from...
View Article