1,817 Topics

Member Avatar for
Member Avatar for riahc3

I see most PowerShell questions being asked in Shell Scripting and its not really a scripting language per say as it is much deeper than that. I porpose it gets its own section...

Member Avatar for pritaeas
0
309
Member Avatar for clife

Hi, I have the a file which contains information as mentioned in the below format. IP:20.20.20.50 DLBytes:0 IP:0.0.0.0/0 DLBytes:0 IP:20.20.20.52 DLBytes:0 IP:0.0.0.0/0 DLBytes:0 IP:20.20.20.53 DLBytes:187329 IP:0.0.0.0/0 DLBytes:17176 IP:0.0.0.0/0 ULBytes:0 IP:20.20.20.50 ULBytes:0 IP:0.0.0.0/0 ULBytes:0 IP:20.20.20.52 ULBytes:0 IP:0.0.0.0/0 ULBytes:187329 IP:20.20.20.53 ULBytes:17176 I am using below commands to extract entries which have proper …

Member Avatar for clife
0
363
Member Avatar for shanenin

I don't understand why my function is not giving similar output as the first example of powershell code PS C:\Users\shane> $x = 3 PS C:\Users\shane> $y = 6 PS C:\Users\shane> $a = $x + $y PS C:\Users\shane> Write-Host "The answer is $a" The answer is 9 My function using similar …

Member Avatar for shanenin
0
334
Member Avatar for Manikanta Sharma

I have a requirement to generate an auto ticket/email when it's time for a scheduled task to be done and it should repeat again when it's time for performing the task. Could you please help me with the script/how this can be done I'm gathering the information to a table …

Member Avatar for Nutster
0
467
Member Avatar for sachin19

find /home/scott/xyz -name "*.log*" -not -name 'access.log' -not -name 'server1.log'-exec cp -i {} /home/scott/zxc/. \; I want to run this command but It doesn't seem to work for two files.How can I achieve this?

Member Avatar for sachin19
0
195
Member Avatar for sheelakumari

I have two text files one file contains values as Id Value 1 apple 2 orange 3 mango 4 banana 5 strawberry 6 papaya In other file i have Id Value 6 strawberry 4 banana 3 orange 1 mango 2 papaya 5 straw berry I have to match between Id's …

Member Avatar for parvai
0
330
Member Avatar for ManojRajput

Hi, Below is the code i am using. On console output is fine but when i am redirecting output to file then single line is breaking in multiple lines. Please help. for dir in */; do printf "%s, " "$dir"; ls -m "$dir"; done **Output on Consloe : ** buckets/, …

0
212
Member Avatar for ennoil

I have (roughly) the following code: read -p "What is your variable: " WHATIS cat > ./test.txt <<EOF This should be a bunch of lines I want this "variable" to be imbedded it is ${WHATIS} EOF I keep getting the literal output of "${WHATIS}. I did this ages ago but …

Member Avatar for chriswelborn
0
2K
Member Avatar for larin83109

Hello again dear Daniwebians, I am asking for some ehlp again. I wrote a littel cript as part of my assigment. My script does what it is suppose to do, but when I run it, it does not end on its own, I have to stop it by "killing" the …

Member Avatar for cfajohnson
0
271
Member Avatar for mkoliwad

Hi All, I need your valuable suggestion as how to sort the log files based on timestamp. Below is the sample log content. string May 28 22:07:48 2015 Log data string May 28 22:07:48 2015 Log data string May 28 22:07:48 2015 Log data I would like to sort based …

Member Avatar for mkoliwad
0
232
Member Avatar for whizkidash

Team, Presently i have some 20 files which i need to copy and store in the common directory. below is the example: script name: dir.sh cp /tmp/abc /home/abc/xyz cp /tmp/def /home/abc/xyz cp /tmp/hij /home/abc/xyz The above script is run, it copies the source files on the destination directory(xyz), wanted to …

Member Avatar for cfajohnson
0
448
Member Avatar for Kevin_17

I have a question is there any possibility for maken a script that you can see if computers are on in your network when you run the script for ex. ./ping.sh 54 62 62 , a script when you give as argument the last digit of the ip adres of …

Member Avatar for cereal
0
299
Member Avatar for Ian_7

Writing a PSUnit test case where I need to get a specific value from a single row in the data table that was generated from my separate powershell function. To do this I figured I could use a foreach loop, but I am not sure how to write the inner …

0
114
Member Avatar for Conor_1

Write a script which accepts some number of arguments and outputs those arguments sorted into alphanumerical order, with each argument on its own line. im usin linus

Member Avatar for happygeek
-1
156
Member Avatar for Gurjit_1

Hi guys , i have found command to extract the output of a command and save it in a file. But I want whenever I extract the data from a command , it should start from a particular line ? I am using this command below to extract data of …

Member Avatar for Rambino
0
227
Member Avatar for hussainv1

We have QA automation jobs that invoke user interface tests in Firefox running on a virtual Linux host. My tests perform regression, but I'm held up because of the Firefox This Connection is Untrusted warning. My current requirement is to ignore this connection untrusted warning, which comes up when accessing …

Member Avatar for rubberman
0
236
Member Avatar for roshnicse

Hi....below is my .csh file. In this foreach n, i have runned my algorithm 10 times. But now i want it to run(iterate) 1000 times. i.e. foreach seed(1 2 3 4 5 6 7 8 9 10 11 12......1000). I tried using awk'BEGIN{for(....);}'.But still its not working...please help. foreach n( …

0
121
Member Avatar for nick jackson

write a Bash script file that implement the RSA algorithm. The user has to enter on the command line some parameters and options, which will determine the behaviors of the script. The syntax of the shell command is $ your-shell-file-name –p<file> –q<file> –e|-d [-i <filename>] [-o <filename>] OR $ your-shell-file-name …

0
102
Member Avatar for vinodvinu

Hi all, Excuse me if i am posting this question in a wrong forum. I have YTD video downloader in my pc. But it doesn't have a download complete message box. Instead, it will display the download status in it's own listview. But if YTD is minimized, then we never …

0
120
Member Avatar for merse

Is it possible to run to run photorec such a way not to recover all photos on a drive just those with specific EXIF data? If photorec cannot solve this request itself, is it possible to do this with a script which can filter the results online?

0
197
Member Avatar for Azii

Hello, I have written the basic shell script "myscript.sh", which prints Hello World. I want to call this script using PL/SQL. Please let me know the procedure(steps) for the same. Thank you.

Member Avatar for Azii
0
1K
Member Avatar for Niloofar24

Hello everybody. How can i get "ls" from shell scripting? I tried this but it doesn't work, i saved it in a file: #!/bin/bash $ls I know the second line is not correct, so what should i type? Getting "ls" is just an example, i infact want to import this …

Member Avatar for Niloofar24
0
252
Member Avatar for Achref_1

i have created my plsql script but i need to run it with shell script but i can get to it please help

0
85
Member Avatar for chriswelborn
Member Avatar for Alex_30

Is it possible to make a bot that would be able to go to a website and vote for said website multipule times?

0
93
Member Avatar for Szabi Zsoldos

Hey guys, I have this script that does count one year of files, 2014, but when it comes to this year, everything messes up. How could I count properly for each year in the same script ? In the attached screenshot it's obvious that I would only need 2014 - …

Member Avatar for Watael
0
1K
Member Avatar for mnparikh

I need to write a shell script that will filter out all files/directroies in a directory that are more than two months old and then copy those files to a new target location

Member Avatar for rubberman
0
454
Member Avatar for Neelima_1

i am using vi editor but when i open file through vi and press i(insert mode),i am unable to type #,$,@...and it is displaying E348 no string under cursor.what do i do,please help me.

Member Avatar for L7Sqr
0
110
Member Avatar for littlesanto

and how would it be if i would like the work with a variable and set the date of the variable 7 days back? mynewdate=(date -j -f "%d %b %Y %T" "mydatevariable 7 days ago" +"%F %H:%M:%S") see also:https://www.daniweb.com/software-development/shell-scripting/threads/50041/how-to-format-this-date-under-freebsd

Member Avatar for David_50
0
133
Member Avatar for clife

Hi, The meaing of ^[0-9] is to exclude the characters specified in the [..], but what is the meaning of ^[0-9][0-9]*$. The expression is used to get the process information from /proc , it lists all the PIDs of all running processes with some appended text. but could not understand …

Member Avatar for clife
0
641

The End.