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 Help ME! this easy for who know


    The UNIX and Linux ForumsAuthority Authority: 170
    Friends; I have little experience with shell and I am not able to resolve this problem: file1: CRA-JJ-W980-01; 2009-11-24; GigabitEthernet; 0/0 CRA-JJ-W980-01; 2009-11-24; GigabitEthernet;1/0 CRA-JJ-W980-01;2009-11-24;GigabitEthernet;3/0 CRA-JJ-W980-01;2009-11-24;GigabitEthernet;5/0 ...
    2 hours ago
  • need an AWK code: put in parallel & average them


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi, I have a data as follow: 1, 1.0 4.00 1, 2.0 4.00 1, 3.0 4.43 1, 4.0 4.40 1, 5.0 4.48 2, 1.0 0.00 2, 2.0 4.40 2, 3.0 3.40 2, 4.0 4.40 2, 5.0 1.47 3, 1.0 1.00 3, 2.0 3.40 3, 3.0 2.40 3, 4.0 2.40 3, 5.0 2.40 I want to print out in parallel: 1.0 4.00 ...
    3 hours ago
  • enter password at prompt during a script?


    The UNIX and Linux ForumsAuthority Authority: 170
    Im using rsync with the "-e ssh" option so of course it asks for a password using a prompt. Is there a way to tell a script to expect a prompt, wait for it, and give a password when it arrives? There is a way to give rsync a password as part of its options using a file, but it only works with an rsync server not ...
    4 hours ago
  • Thoughts on a third-rezday plummet


    Dale Innis's WeblogAuthority Authority: 113
    Just me and the sky and a prim When I first came to Second Life , three years ago last Sunday, I was mostly intrigued by the idea that you could make things there, in this “virtual world” where the laws of physics would be perhaps kinder, and more mutable, than in the real world. Although we all know that ...
    4 hours ago
  • Deleting words between tags


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi !!! I need to write a script(ksh) that deletes any character outside tag and from a file. For eg: Code: $cat file.txt ad bd as d e f mb mu g h i a b c a f g Then output should be:: Code: ad bd mu g h i a f g Thanks...
    5 hours ago
  • Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d


    The UNIX and Linux ForumsAuthority Authority: 170
    This is the code: Code: while test 1 -eq 1 do read a $a if test $a = stop then   break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the script doesnt anything ...
    11 hours ago
  • Replace a column with a value conditional on a value in col1


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi, Perhaps a rather simple problem...? I have data that looks like this. Code: BPC0013 ANNUL_49610 0 0 1 1 BPC0014 ANNUL_49642 0 0 2 1 BPC0015 ANNUL_49580 0 0 1 1 BPC0016 ANNUL_49596 0 0 2 1 BPC0017 VULGO_49612 0 0 1 1 BPC0018 ANNUL_49628 0 0 1 1 BPC0019 ANNUL_49692 0 0 2 1 170291_HMG ANNUL_170291 0 0 1 1 ...
    11 hours ago
  • Need script to tar files older than 30 days


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi all. Heres my situation: I have performance reports that run every 30 minutes saved in the format: stats_report_11251000.txt stats_report_11251030.txt stats_report_11251100.txt stats_report_11251130.txt (Obviously run at Nov 25 10 AM, 10:30 AM, 11 AM and so on...) I would like to write a script that will tar ...
    12 hours ago
  • assign dscl output to variable as an array


    The UNIX and Linux ForumsAuthority Authority: 170
    Greetings folks, I am trying to assign the output of a dscl command (contains name id) to a variable as an array. Currently I am piping the output into a tmp file, then reading the tmp file into an array, then parsing the array. I would like to bypass creating the tmp file portion of the code. currently I am ...
    12 hours ago
  • awk to print field no 10 and complete event


    The UNIX and Linux ForumsAuthority Authority: 170
    hi, awk -F ";" {if($10>500) then i++; } END{print i} event_file_FR12_202_24-11-2009_* | less How to modify and add to this above to print the complete line in less ex : 4712714002021527;15298888;241129 095614 558;131;0;0;63u;0;NA;44;139257004;1;155130;159728;531920;Y;PRE;0;0;NA;NA;0;NA;0;NA; ...
    1 day ago
  • Advanced printf


    The UNIX and Linux ForumsAuthority Authority: 170
    I want to print: WELCOME TO MY WORLD Where "WELCOME TO MY WORLD" will be in green (32) and the underline will be in yellow (33). How can i do the above using printf. Code: printf "`tput smul`\033[1;32mWELCOME TO MY WORLD\033[0m\n`tput rmul`" leaves both the text and the underline in green.
    1 day ago
  • Order file by lines


    The UNIX and Linux ForumsAuthority Authority: 170
    My script(3 arguments $1 = folder,$2 extension,$3 string) should do the following things: -Enter in the folder of $1(if exists). -Put ls *.$2 > temp.txt ( I use a temp file to store the result of ls command and if $2 = txt in this file Ill have all the .txt files of the folder) -Now I want to return a list of files ...
    1 day ago
  • nslookup output


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi All, If I give the hostname followed by nslookup, I get the output like below, commandprompt>nslookup efgh Using /etc/hosts on: xyz looking up FILES Trying DNS Non-authoritative answer: Name: abcd Address: 47.47.47.47 Aliases: efgh I am not sure on the bolded ones. Can anyone let me know what ...
    1 day ago
  • Help on "for" loop in bourne shell


    The UNIX and Linux ForumsAuthority Authority: 170
    Hello Everyone.... I am trying to print a number sequence in following format using for loop. Quote: 1 22 333 4444 55555 I am using a bourne shell. I tried following for loop condition but it is bash syntax. Code: for (( i=0; i It is giving syntax error. Kindly help with the ...
    1 day ago
  • calling a method inside awk


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi All, How do we call a method existing in another file inside awk. After matching a pattern i want to call a method secureCopy that exists in another file, but method not getting called: Code: ls -l | awk  -v var2=$servername -v var1=$srcserverpath -v var3=$tgtpath /File19112009Name[0-9]+\.xml$/ {   ...
    1 day ago
  • Using sed to replace a string in file with a string in a variable that contains spaces


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi, i call my shell like: Code: my_shell "my project name" my script: Code: #!/bin/bash -vx projectname=$1 sed s/PROJECT_NAME  =/PROJECT_NAME  = $projectname/ temp cp temp test_config_doxy the following error occurres: Code: sed s/PROJECT_NAME          =/PROJECT_NAME        ...
    1 day ago
  • processing small database. not relational


    The UNIX and Linux ForumsAuthority Authority: 170
    Hello, Sorry for the length of this post, if you hate walls of text best click the next thread button :P I am fairly new to scripting, although I have used some before and written some scripts to create c++ auto code (very large echo statements :P). I have to do some scripting as part of my course, and have been ...
    1 day ago
  • Perl map doubt


    The UNIX and Linux ForumsAuthority Authority: 170
    Hello , Please can someone tell me what exactly happens when the below filehandler is chomped into an array and later mapped. $lcpLog="logcopy\@".getTimestamp."\log"; open CFg ,"chomp(@cfg = ); close CFG; @cfg=grep { $_ ne } map { lc + (split /\s*\/\//) [0] } @cfg; Please explain what happens in above line
    1 day ago
  • VBA Field Calculator Tips in ArcMap (Kelso)


    Kelso's CornerAuthority Authority: 422
    Ive been relying on the Advanced logic options in ArcMaps Field Calculator to wrap up Natural Earth Vector. Because of the diacritical (accent) marks present on many placenames around the world, care must be taken to ensure they dont get corrupted. Code snippets include: Splitting strings, find and replace, counting ...
    1 day ago
  • get rid of the 7th character of each line if this is a space


    The UNIX and Linux ForumsAuthority Authority: 170
    I have a text file like this Code: ...     B 16  1.340E+05     A 18  3.083E+02   Wu123  1.365E+02 ... I would like to get rid of the 7th character of each line if this is a space character. Thank you, Sarah
    1 day ago

Comments about scripting

Personal attacks are NOT allowed
Please read our comment policy