Quantcast
Channel: UNIX and Linux Forums
Browsing all 16232 articles
Browse latest View live

Sum values of specific column in multiple files, considering ranges defined...

I have a file (let say file B) like this: Code: File B:  A1  3  5  A1  7  9  A2  2  5  A3  1  3 The first column defines a filename and the other two define a range in that specific file. In the same...

View Article


How to get the variable from a variable.?

Contents of runcalc3.msh Code: execute calculation $ess_app.$ess_db.zap_data; I want to get the contents of runcalc3.ksh in a variable in such a way that I get the value of ess_app and ess_db also...

View Article


Best solution for a network share?

This is in a CentOS 6 environment, our developer needs to be able to specify a relative path to a shared folder so that four machines can all point to the same shared directory, so I need to know the...

View Article

Simple Chess Clock

I am trying to implement a simple chess clock. It should have the following options: start, stop, reset, read. Reset will set the time to zero Start will start the clock Stop will stop the clock My...

View Article

How to know exactly which physical partion contains data?

Code: /dev/fslv01        5.00      2.90  42%      776    1% /movelv_test Code: fslv01:/movelv_test LP    PP1  PV1              PP2  PV2              PP3  PV3 0001  0175 hdisk1            0111 hdisk0...

View Article


Xhost command not working

Hi, I am not able to work with the command xhost. I need to open the same machine (not any other remote machine) in UI mode. How can I open this using xhost? I am using Putty to login to this machine....

View Article

Search option

Hi, I have to search for strings in file name something like HTML Code: search for "Needs" OR "History" in filename "UserStudyHistory.csv" i know using "grep", we can search inside the file, but...

View Article

Impute values within groups

Hello all, this is quite complex, so please allow me some space to make the problem clear. I have several groups which has 3 types T1,T2 and T1*T2. The T1 (and T2) values are always in doubles ( aa,...

View Article


If + expr

Hi I have bellow script: Code: t1=`cat node1.txt | grep thread1 | cut -f2 -d '-'` t2=`cat node2.txt | grep thread2 | cut -f2 -d '-'` t3=`cat node1_rcat.txt | grep thread1 | cut -f2 -d '-'` t4=`cat...

View Article


Rdesktop connect to opensuse, < > Key without function

Hello all. We have running one xubuntu VM on VMware. On this Desktop System 12.03 32 BIT we connect us through x2go. From this System, we go to by rdesktop to an opensuse vm. But there, our <>...

View Article

[FUN] Numbers to Roman letters/num

Heyas Just a little fun script (code block) i'd like to share for fun. Code: #/bin/bash # roman.sh # #        Function #         num2roman() { # NUM         # Returns NUM in roman letters         #...

View Article

Shell Script Problems

Hi, I'm newbie in the shell script world and i want to solve some problems I am experiencing. My main goal is to create a ksh script to use 2 text files as input to execute a local shell script(create...

View Article

Remove rows containing commas with awk

Hello everyone, I have a dataset that looks something like: Code: 1 3 2 2 3 4,5 4 3:9 5 5,9 6 5:6 I need to remove the rows that contain a comma in the second column and I'm not sure how to go about...

View Article


Search multiple pattern from list

I am working on AIX operating system. I want to search list of Article Id for given Set Date (which are present in a seperate file input.txt) art_list.csv ------------ Code: "Article ID"        |"Ad...

View Article

Tar only files with a pattern

Dear All, I have a big tar.gz file with 210 files. About 60 of them have *.control.* pattern and I want only these. Is there a way to extract only the files with this patter? I tried zgrep with tar,...

View Article


Comparing columns in 2 text files

Hi i have 2 files file1.txt Code: XX,ZZ,XC,EE,RR,BB XC,CF,FG,RG,GH,GH File2.txt Code: DF,GH,MH,FR,FG,GH,NOTOK XX,ZZ,XC,EE,RR,BB,OK result Code: XX,ZZ,XC,EE,RR,BB  OK look for column1 , XX and if it...

View Article

What is the ruby main method?

I am trying to obtain documentation using ri on my local machine. If I dont require any method in my script and I want to find information on .value or .inspect or anything that is native without...

View Article


Mysql missing mysqld.sock (Linux)

I am trying to start a server for a class I am in but... mysql won't start with this error ( ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) )...

View Article

Connection is broken because of underlying network issues

Hi Guys, I have two databases where I copy archivelog files from server A to server B frequently...yesterday we did the VM upgrade now...I am struggling to copy/ship the files from server A to server...

View Article

Where are people landing on the sytemd debate?

My two primary distros are Gentoo and Debian and I'm a fan of the older more traditional init system but as we all know Debian is moving to systemd. Not sure how impartial the crowd is here but I'd...

View Article
Browsing all 16232 articles
Browse latest View live