awk With multiple print variables
Hi, I have a parameter which will be having the fields which needs to be filtered or derived. But This is not working which is mentioned below. I am using the below mentioned OS Code: uname -a SunOS...
View ArticleReading between a repeated string
I have a requirement where I have to read the lines between a repeated string FileName: abc.txt Code: ls /data/abc.txt 1 2 #ZENCO 3 4 5 6 #ZENCO 11 213 454 7 #ZENCO I need to output this 3 times based...
View ArticleDate Time Zone Conversion (backwards of what I want)
I am trying to convert local time to time in Ireland. Instead it is going the opposite direction (taking the local time as it if were in Ireland and displaying that the time would be here). Code: $...
View ArticleHow to merge fields in a single file using awk ?
Hi, From a file, using: Code: awk -F" " '{ if (NF == 6) print $1, $2, $3, $4, $5, $6; if (NF == 5) print $1, $2, $3, $4, $5; }' i printed out the required output. But i'm trying to merge the columns....
View ArticleService memory
Hi I am modifying the arguments for starting a java service. It has some predefined arguments and I am adding my argument to increase the heap size. When starting the service my argument(Xmx256M) gets...
View ArticleScript to find users not logged in for 90 days
Dear All, I need your help in finding out users not logged in to linux system for more than 90 days. I found a script from our forum i am getting error while using that. from the code i have debugged...
View ArticleExtracting a part of a string
Hi, I needed to extract some specific characters from a string based on user input. For example: After the script executes the user enters the following details: Code: Please enter the string: This is...
View ArticleJoin with awk different column
hi guys, i need help I need to join file2 to file1 when column 3 in my file1 and column 1 in my file2 in the same string file1 Code: AA|RR|ESKIM RE|DD|RED WE|WW|SUPSS file2 Code: ESKIM|ES SUPSS|SS...
View ArticleDisk Space Script to direct output
Hi, I am working on Sun Solaris 5.10 and want to direct the output from a disk space check script to an output file; Code: #!/bin/bash CURRENT=$(df -k /log/logs | grep /log/logs | awk '{ print $5}' |...
View ArticleBooting to Command Prompt
Hello, I need help booting to a command prompt. The server runs SCO Openserver 5.0, with a point of sale program that automatically boots upon startup. I can't gain root access, and the administrator...
View ArticleUsing rm to remove windows shell file
I am trying to remove several files in a specific location using rm , my question is how can windows shell common files be removed? For example, in the below code all the files without and extension...
View ArticleIterate column with perl
I can not figure out how to iterate a perl command that inputs a value into columns and then combines them. I need to put a numerical value in column one and the word "Null" in all others, and then...
View ArticlePYTHON COPY Contents of file1 into a specific entry in file2
file1 Code: cat dog fish file2 Code: This is a bunch of lines <!-- INSERT ANIMALSĀ HERE --> horse cheetah post results file2 Code: This is a bunch of lines <!-- INSERT ANIMALSĀ HERE --> cat...
View ArticleBASH install
Hi im trying to install BASH on my hp-ux i have the depot file on my machine. im runnig the command: swinstall -s "name of the file" and on the very first screen im unable to pass the first phase,...
View ArticleCIFS/SMB mount NetApp (Windows) fileshare
Hi guys, I'm trying to mount a windows share (hosted on a NetApp filer with clustered Ontap 8.3) and I have no luck doing it. This worked before when we used an old NetApp with Ontap 7.3. Seems there...
View ArticleUsage of disc group to kick off Oracle RMAN backup
Hi guys, i need a small help. I was writing an automation script for import utility of oracle datapump. I am getting stuck in one part of the shell script where i am doing a grep on one of the...
View ArticleIssue with tar coomand
Hi all, I have a folder that I am trying to tar ut is leading to unexpected results. Ive written a script that find a certain number of files(logs) with specific names older than 14 days, moves them to...
View ArticleSum column values matching other field
this is part of a KT i am going thru. i am writing a script in bash shell, linux where i have 2 columns where 1st signifies the nth hour like 00, 01, 02...23 and 2nd the file size. sample data...
View ArticleHow to declare an array in UNIX and print the elements with tab delimits?
Hello, In a shell script, I want to declare an array and subsequently print the elements with tab delimits. My array has the following structure and arbitrary elements: Code: myArray=('fgh' 'ijk' 'xyz'...
View ArticleMerge rows into one if first 2 columns match
Hi, I wanted to merge the content and below is input and required output info. Input: Code: /hello,a,r /hello,a,L /hello,a,X /hi,b,v /hi,b,c O/p: Code: /hello,a,r:L:X /hi,v,:v:c Moderator's Comments:...
View Article