Change permissions
Hi everyboy, I've installed a Virtualbox on my computer, inside the VB i'm running RedHat. So my problems it's that i need to run the scripts runasroot.sh to install the guest addiont, i'm doing this...
View ArticleQuestion about sudo
Hello all, I have a script (script.sh) that is owned and executed by root. Now I need to give another user (user1) sudo access to execute that script. I edited the /etc/sudoers file, and created the...
View ArticleDNS Resolution Issue
Hello, Having issue resolving DNS using the IP address. Using the server Name it resolves fine. Was wondering if there is any configuration issue. [root@xxxxxxxx01]# nslookup xxxxxxxx01 Server: Primary...
View Articlefatal error: stdio.h: No such file or directory
Trying to compile a C program recievin this hello.c:1:19: fatal error: stdio.h: No such file or directory gcc is installed on the system. Code: echo $PATH...
View Articlehow to generate random number as as the first column of a txt file
Dear all, I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000) thanks a lot! Lin
View ArticleRemove las 4 lines of a file
Hi, I have a file from which I need to remove the last n lines. I was successful in removing only the last line using : Code: sed '$d' file_name Could you please help me with the command. Thanks, H2...
View ArticleHas Oracle killed HP-UX
Has Oracle killed HP-UX with their gambit of telling the public they would no longer support Itanium? The company I work for in the Dallas, TX area has had several openings for HP-UX administrators and...
View ArticleCan not ping default gateway
Hi, Here is the issue: There are 2 identical systems in the same subnet here. They can ping and ssh each other. One can ping the default gateway and one can not with error '... icmp_seq Destination...
View Articlejoin two files
Hi, File1.txt Quote: SNP2 1 SNP3 1 SNP5 1 SNP4 1 File2.txt Quote: SNP3 2 SNP1 2 SNP5 2 SNP4 2 SNP2 2 I want output like this. Quote: SNP1 NA 2 SNP2 1 2 SNP3 1 2 SNP4 1 2 SNP5 1 2 Ive used join -a1 -a2...
View ArticleDiff on 1gb files
Hey Guys, I have a scenario to compare two different files which are of size 1gb each. I need to get the uncommon lines. I planned to use sdiff command, which generally works perfect for me. But in...
View ArticleCalculate difference in timestamps based on unique column value
Hi Friends, Require a quick help to write the difference between 2 timestamps based on a unique column value: Input file: Code: 08/23/2012 12:36:09,JOB_5340,08/23/2012 12:36:14,JOB_5340 08/23/2012...
View ArticlePipe awk's output to sed for deletion
Hi Friends, I am using a command that prints certain lines from a file. For ex: cat input Code: abc chr1 456 def chr1 789 ghi chr1 999 jjj chr1 777 jhk chr7 914 My command Code: awk '{if($2=="chr1"...
View Articlesum and proportion calculation
I have a file like this: HTML Code: ASSLRADTQY 319895 SAIVVGGSNQPQH 252661 ASSLDRGEIQPQH 237702 ASSYSPGGWTDTQY 106598 ASRMTGRATEAF 70363 SARDTRGEQY 69429 ASSLALDSEAF 58879 SATTWTSGLLDTQY 46100...
View ArticleChange the entire filesystem
Hi everyone, I've installed RedHat 5 enterprise into a VirtualBox, but some how i can't eve create a single file, cause appear u message like this: Read-only filesystem. i'm logged as root. Any idea
View ArticlePerl: Pattern to remove words with less than 2 characters.
Hello. I've been thinking about how to go about this. I know I'm close but still does not work. I need to remove any word in that is not at least 2 characters long. I've removed all the non-alphabetic...
View ArticleNeed Help in arranging the output
Hello All, Please find attached input and output files. I want to write a shell script to achieve this. I tried using awk but not getting how to do this as I am new to shell programming. Thanks...
View ArticleDuplicate files and output list
Gents, I have a file like this. Code: 1 1 1 2 2 3 2 4 2 5 3 6 3 7 4 8 5 9 I would like to get something like it Code: 1 1 2 2 3 4 5 3 6 7 Thanks in advance for your support :b:
View ArticleHelp! Need "File exist check" and line count
Hello, I've been stuck with this for a few days now :wall:, so I'm hoping someone out there might be kind enough to help me. I need to do a "file exist" check with a variable in the file name. After...
View ArticleGAWK/GREP Equivalent
What is GAWK equivalent to greps -B 5 -A 5? Code: zgrep -i "^oct 20" /var/log/syslog*|grep -iB 5 -A 5 'postfix\/pickup /var/log/syslog.1.gz:Oct 20 01:55:01 elmo CROND[7682]: (mail) CMD (/usr/bin/python...
View Articledoes anyone have a goodlink for downloading cygwin
hi, I am looking to download cygwin. Everytime i try cygwin i fail because of slow net connection. i have downloaded the initial version of cygwin. i am looking to download the whole version ( i mean i...
View Article