Scripting

Tag details

Welcome to the 'Scripting' tag page at Technorati. This page features content from the farthest reaches of the Blogosphere that authors have "tagged" with 'Scripting'.

Look up Offsite Link "Scripting" at The Free Dictionary

Latest blogosphere posts tagged “Scripting”

  • AWK: read values from file1; search for values in file2


    The UNIX and Linux ForumsAuthority Authority: 171
    I have read another post about this issue and am wondering how to adapt it to my own, much simpler, issue. I have a file of user IDs like so: Code: 333333 321321 546465 ...etc I need to take each number and use it to print records wherein the 5th field matches the user ID pulled from the first file. Naively, ...
    3 hours ago
  • Averaging segments and including the name


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello, I have a awk line that averages rows. So if my file looks like this: Code: Jack  1  1  1  1  1  1 Joe    1  1  1  1  1  1 Jerry  0  0  0  0  0  0 John  1  1  1  0  0  0 The awk line below skips column 1 and then averaged the rows Code: awk -F\t -v r=3 {for(i=r+1;i The ...
    3 hours ago
  • Format problem


    The UNIX and Linux ForumsAuthority Authority: 171
    can any one know that how can i get perfect format of phone number my function is Code: phone_number=`echo $name_number | awk {print $NF}` check=`echo $phone_number | egrep -c "[0-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]"` i get the format but if i need perfect format like xxx-xxx-xxxx. if i enter ...
    3 hours ago
  • Safer Online Shopping with Internet Explorer 8


    The Windows BlogAuthority Authority: 697
    Yesterday was what is known as “Cyber Monday,” which is the first Monday after Black Friday every year and is one of the top online shopping days here in the United States. Cyber Monday is when people move to the Web to make purchases they missed in stores during Black Friday. And many online retailers offer hot ...
    3 hours ago
  • Replacing a string with new line


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, Can anyone help me know how to replace a string with the new line   for ex: file1 val1 or val2 or val3 or I need to replace the "or" with new line. Thanks in advance
    4 hours ago
  • File manipulation with AWK and SED


    The UNIX and Linux ForumsAuthority Authority: 171
    Hello How do i check that correct input files are used while using AWk and SED for file manipulation? e.g awk /bin/ {print $0 } shell.txt sed s/hp/samsung/ printers.txt how do i ensure that the correct input files I am working with are used?
    7 hours ago
  • Quick help on awk needed...!!


    The UNIX and Linux ForumsAuthority Authority: 171
    Code: bash-2.05$ A=`cat /etc/group |awk -F: {if ($1$3$4 == ...
    7 hours ago
  • Photoshop Scripting


    Get a Freelance JobAuthority Authority: 182
    I need a function (script) wich opens an image in Photoshop, replace text in some textlayers and store image as jpeg. I want to call the function with the path of the PS-image, an array with the textlayers and the text to replace, the x resolution in pixel and the path of the resulting jpeg file. It mus be possible to ...
    8 hours ago
  • Delete Files Based on Datetime Stamp


    The UNIX and Linux ForumsAuthority Authority: 171
    I have a Unix directory, lets call it /home/id for example purposes. It contains the following files: oldfile.txt.20091101, oldfile.txt.20091102, oldfile.txt.20091103, etc. I am trying to create a Korn Shell script that will go to /home/id and delete any oldfile.txt that has a datetime stamp that is older than 14 ...
    8 hours ago
  • Eliminating output?


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi Folks, I am writting a shell script for general purpose use.... i have created a function like below:- Code: largest_file() { clear tput cup 20 30 echo please enter the full directory path where you want to search:- tput cup 21 30 read lr_choice1 tput cup 22 30 echo please enter the no ...
    8 hours ago
  • Doubts about variables


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, If I have a variable in a configuration file like this: Code: BTS=53,1-2-3-6 export BTS As might get each of the variables in this parameter? "53" "1" "2" ....
    9 hours ago
  • Line Number Script


    The UNIX and Linux ForumsAuthority Authority: 171
    If i have text file how do i find the line with the nth occurance of a certain string, so in example below i want line number of 3rd occurance of COD1 which should be line 7 COD1 COD2 COD2 COD1 COD2 COD2 COD1
    9 hours ago
  • Issue when using phpflickr.


    Computer Programmers, Programming Forum | Young CodersAuthority Authority: 145
    I use phpFlickr (last stable version) on Windows Vista and WAMP2.0 : and I have these : [code]Strict Standards: Assigning the return value of new by reference is deprecated in .../phpFlickr.php on line 91 Strict Standards: Assigning the return value of new by reference is deprecated in .....phpFlickr.php on line ...
    10 hours ago
  • Error with my file


    The UNIX and Linux ForumsAuthority Authority: 171
    Hi, I have a file like this (tab seperated): Code: title number JR  2 JR  2 JR  4 JR  5 NM  5 NM  8 NM  2 NM  8 this code: Code: awk !/^$/{a[$1]=a[$1]"      "$2} END {for ( i in a) {print i,a[i]}} filename converts the above files into a file that looks like this: Code: JR 2 2 4 5 ...
    10 hours ago
  • How to get the information about cpu idle from top command


    The UNIX and Linux ForumsAuthority Authority: 171
    I am using Ubuntu 9.04. I want to write a shell script to get the information about cpu idle from top command at the real time when i call it, compare cpu idle with 20 (20%), if cpu idle > 20 exit 1, vice versa exit 0. Anybody can help me to resolve it ? Thanks alot.
    10 hours ago
  • where are my sites hosted?


    The UNIX and Linux ForumsAuthority Authority: 171
    I have 5 public websites (2 different datacenters) 1. production datacenter 2. Backup datacenter. I have a global site selector which will load balance the site based on availability and load. I would like to have a script that can tell me exactly where my sites are in 2 columns. example.... www.site1.com ...
    11 hours ago
  • How to create a file with full permission in unix script


    The UNIX and Linux ForumsAuthority Authority: 171
    In my script, I am creating a file ----> then writting one line (i.e. Timestamp) ----> then FTPing. The same script can be executed by many other users. While other users executing this script, they couldnt Over write this one line (i.e. Timestamp) My expectation So I wanted to create a file with ...
    11 hours ago
  • How can i change my bash prompt ?


    The UNIX and Linux ForumsAuthority Authority: 171
    It looks like, user@hostname:/auto/home3/user$ Desired, user@hostname$ I added following line in .bashrc, but still its same. export PS1="[\u@\h] $ " Please help me :confused:
    11 hours ago
  • deleting columns by list or file


    The UNIX and Linux ForumsAuthority Authority: 171
    Dear specialists out there, please help a poor awk newbie: I have a very huge file to process consisting of 300000 columns and 1500 rows. About 20000 columns shall be deleted from that file. So it is clear, that I cant do this by writing down all the columns in an awk command like $1, $x etc. I have a text-file ...
    12 hours ago
  • help on capturing /etc/group info.....!!


    The UNIX and Linux ForumsAuthority Authority: 171
    Gurus I am trying to capture all the data in /etc/group file in a CSV ,thru a fingerprinting engine. For hosts having ,unique group names and Ids ,following code works fine. Trouble starts when on a host,there are multiple groups defined with same name and id. e.g One of my hosts has 8 groups defined with ...
    12 hours ago

Comments about Scripting

Personal attacks are NOT allowed
Please read our comment policy