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

Where unset command locates?

Hi, Can someone tell what is the path for "unset", I tried "which" command but getting below error Code: # which unset /usr/bin/which: no unset in...

View Article


Solaris 10 packages

Hi all, Does anyone know where you can get solaris 10 packages these days? It seems that sunfreeware have now started charging you to download them, which is good. I have found opencsw, but that seems...

View Article


What is your favorite terminal?

And how does one executes a command there? Mine is: Code: lxterminal -e ./script.sh

View Article

Q on RPM, conditional install or removal, like installf, removef

I am creating binary RPM on RedHat 6 and would like to do this: at install time, depending on situation, install a file or not install it For comparison, I do this on solaris using "installf", is there...

View Article

Loop counter resets by itself

Hi! Can anyone explain this? The counter CDR_count should go on forever, but it suddenly resets at every step of the FOR loop (I know this because $_file has exactly 378 records). However, the counter...

View Article


Can i see wich Computers are up in my network with a script

Code: #!/bin/bash for ((n=0 ; n < 254 ; n+=1)) do     ip=192.168.0.$n     if ping -c 1 -w 1 $ip > /dev/null 2> /dev/null >> /etc/logping.txt; then          echo "${ip} is up" # output...

View Article

How do I set up dnssec ?

Hi, I am receiving 'no valid signatures' errors in /var/log/messages. I understand that it would be gone if I set 'dnssec-enable no' in named.conf. But I want to let it be (i.e 'dnssec-enable yes')....

View Article

Creating a captcha with amazon node .htaccess"

hello i have a project that i have to create a captcha can someone please help me do this in my mac terminal im a beginner tell me the steps to do this? in public_html, create a file named ".htaccess"...

View Article


Import 2 columns from 8 .csv files into pandas df (side by side) and write a...

I have 8 .csv files with 16 columns and "n" rows with no Header. I want to parse each of these .csv and get column [0, 8] [#where column 0 is the value of x, y, z etc and column 8 is always the value...

View Article


Explanation of FNR in this awk script

To merge mutiple *.tab files as: file1.tab Code: rs1 A A rs2 A A rs3 C C rs4 C C file2.ind Code: rs1 T T rs2 T T rs3 G G rs4 G G and file3.tab Code: rs1 B B rs2 B B rs3 L L rs4 L L Output: Code:...

View Article

Content of filtered files write as columns into one file

Hi everybody! i have a lot of files where i filter out data. Code: #!/bin/bash f=sample_*.Spe for i in $f `eval echo ls sample_*.Spe` do         if test -f "$i"         then awk 'FNR==8 ||FNR==10 ||...

View Article

Search and replace with variable

Hello all, I stumbled upon a command line for multiple search and replace within given destination Code: perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.html I want to replace the following line where...

View Article

Image may be NSFW.
Clik here to view.

How can draw line on Ubuntu, shell programming?

how can draw line like this? on ubuntu, shell programming. i tried "-" , " l " but it's failed.. Attached Images 123.jpg (21.1 KB)

View Article


Awk: Print Error While Redirecting output in multiple Files

Hi, I have a following code in which I am unable to redirect to multiple files. Can anybody please help with some corrections Code: awk -F, '{ if ( substr($1,26,2)=="02" &&...

View Article

Need ./ to execute scripts

Hi, I am really sorry for this question but still i am confused. I have shell script called sample.sh I can execute only with the combination of ./sample.sh Is ./ really necessary ? Is it something...

View Article


Combine data out of 3 files into one new file

Hi, how can i combine the datas of of three files into one new file? I try to give as much informations as possible. The three existing files are called file1 file2 and file3 the new file should named...

View Article

How to rename all files at a time by appending some characters at the begining?

Hi I have a list a filename in a directory starting with particular pattern for example: abc_1234.txt abc_7565.txt abc_7676.txt abc_7765.txt i need to rename all these files by appending bck. or bck_...

View Article


Not enough information...

I appreciate the fact that rules are for everyone and I screwed up by not putting a screen printout in code brackets... However, I was a bit dismayed when I received the following and tried to reply to...

View Article

Select all the even columns from a file

Hi, I can select all the even columns from a file like this: Code: awk '{ for (i=1;i<=NF;i+=2) $i="" }1' file > new file How can I select the 1st and all the even columns using awk? Thanks!

View Article

Sort & Uniq -u

Hi All, Below the actual file which i like to sort and Uniq -u Code: /opt/oracle/work/Antony/Shell_Script> cat emp.1st 2233|a.k. shukula              |g.m.          |sales          |12/12/52...

View Article
Browsing all 16232 articles
Browse latest View live