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 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; ...
    15 hours 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.
    16 hours 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 ...
    16 hours 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 ...
    17 hours 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 ...
    18 hours 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$/ {   ...
    18 hours 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        ...
    18 hours 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 ...
    18 hours 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
    19 hours 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 ...
    19 hours 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
    20 hours ago
  • put one string one from location to another location in a file


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi Everyone, I have 1.txt Code: here a b c funny"yes"; d e The finally output is: Code: here a b c d e funny"yes"; is any simple way using awk? or others? thanks :confused:
    20 hours ago
  • Help me with following issue using shell script


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi Folks, I am looking for a script where that should show the progress bar while running a process Ex: while copying a file of size say 2 GB it should start the process as (0 %) and at the end it should show (100%) Thanks in Advance Phani.
    20 hours ago
  • Shell script to delete all files with .html extension in a folder


    nixCraft Linux ForumAuthority Authority: 144
    Hi all..I am very much new to shell scripting and I am highly interested to learn this as I can use this to automate many things ;) can any one from here please create a shell script with the following requirements ? Desired a script that will automatically delete all files with .html extension in a folder/directory ...
    20 hours ago
  • Requsting a simpleshell script


    nixCraft Linux ForumAuthority Authority: 144
    Hi all..I am very much new to shell scripting and I am highly interested to learn this as I can use this to automate many things ;) can any one from here please create a shell script with the following requirements ? Desired a script that will automatically delete all files with .html extension in a folder/directory ...
    20 hours ago
  • Pass a string with spaces to a shell script


    The UNIX and Linux ForumsAuthority Authority: 170
    Im a beginner and wasnt able to google my problem... I would like to pass a string with spaces to a shell script. my test_shell: Code: #!/bin/sh -vx ####################################################### # generate_documentation (c) Ch.Affolter Nov. 2009 Version 1.0 # ...
    21 hours ago
  • grep two lines in a file


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi Everyone, I have 1.txt Code: 1 6-6 3-3 word y f 6-6 word 5-5 4 5-5 word The output should be: Code: 3-3 word 6-6 word 5-5 word if i use grep, i can grep word, but if i want to get the line with word, and its previous line, how should i do, awk, sed , perl , :confused: Thanks
    23 hours ago
  • URL Monitoring


    The UNIX and Linux ForumsAuthority Authority: 170
    Dear All, I need to monitor few URL sequences for my web site. just to tell u guys we have a very business critical financial portal. I am looking out for a script which will automatically shoot a mail as soon an any of the URL sequence is gone down. we also have the error page which will be displayed to the end ...
    23 hours ago
  • Count of files in directories


    The UNIX and Linux ForumsAuthority Authority: 170
    Hi, I have a requirement to find out the count of files in directories. I can do this very well by goind to each directory and then ls -lrt | wc -l. But I need to do it for hundreds of directories/sub-directories. I tried with this - for i in `ls -F | grep /$`; do `echo "$i"`| ls -lrt `echo "$i"` | wc -l; done; ...
    1 day ago
  • Need help in comparing a file with log file: perl code


    The UNIX and Linux ForumsAuthority Authority: 170
    Dear Members, I need a perl code: 1. Which will open first file with two columns separated by tab: 37 Distribution and seasonal variation of trace metals 85 Seasonal variability of the mixed layer in the central Bay 99 Dynamics of transparent exopolymeric particles (TEP) 103 Bacterial extracellular polymeric ...
    1 day ago

Comments about Scripting

Personal attacks are NOT allowed
Please read our comment policy