1,817 Topics

Member Avatar for
Member Avatar for old_apache

i have 2 files, one file created on Windows and another was made on Ubuntu, i want to use this command: comm -12 file1 file2 how do i do that?

Member Avatar for old_apache
0
183
Member Avatar for old_apache
Member Avatar for coding101

trying to send email from nc nc smtp.gmail.com 587 HELO there 250 mx.google.com at your service STARTTLS 220 2.0.0 Ready to start TLS MAIL FROM:<junk@example.com> connection dies.. whats wrong with the protocol im using??

Member Avatar for JeoSaurus
0
108
Member Avatar for mossman mudas

i want to find the total space used for the files owned by me from my current directory. i have du -sh `find ./ -user $USER -type f` which gives 8.0K ./.a 8.0K ./t 4.0K ./cat/A 4.0K ./a using -s has no effect. using du -sh by itself includes the …

Member Avatar for mossman mudas
0
150
Member Avatar for saadi068

I am (student) just switched to linux working on NoC (noxim) simulator in ubuntu 12.04 c++ is supported assignment from university, I want to make a script that call my whole program multiple times (for loop= e.g 10) and want to take average value from the functions that were called …

Member Avatar for Watael
0
237
Member Avatar for Aamit

Hi, I have dates like 20130402 (y-m-d i.e 2ndApr13) Dates are 20130402, 20130404, 20130409, 20130412 if date is 20130402 out put is 20130408 , if date is 20130412 output is 201304015 dd="20130402" echo $dd This gives me current dates next monday , date -d "next monday" +%Y%m%d How to find …

Member Avatar for ahamed101
0
87
Member Avatar for sudipta.mml

my input file contais this text DOPC 1024 PW 30903 CL- 1 arg01 1 My output file should be DOPC 1024 PW 100 CL- 10 arg01 1 I have used this following command for the single substitution and it works well. read no_water read length sed s/"PW 30903"/"PW $no_water"/ arg01.top …

Member Avatar for sudipta.mml
0
181
Member Avatar for boshu

Hi, I am trying to write a small shell script that will take user input on SVN branch and validate that the requested branch exists in SVN. And then continue with other operations if the branch is valid. I tried the following but seems its not working right: VALID_BRANCHES="4.2.1 4.1.0 …

Member Avatar for Watael
0
264
Member Avatar for pooh1234qwerty

$ awk -F ":" 'NR!=1 {print $1}' test1.txt what does this mean?? especially ":"??

Member Avatar for Watael
0
109
Member Avatar for pooh1234qwerty

i am a beginner. i need online tutorial for shell scripting. there are many on the web.. which one to choose??

Member Avatar for DoRight
0
231
Member Avatar for gtam

Hello I'm writing a script to get content of web pages on different machines and compare them using their md5 hash hear is my code #!/bin/bash # Cluster 1 CLUSTER1_SERVERS="srv01:7051 srv02:7052 srv03:7053 srv04:7054" CLUSTER1_APPLIS="test/version.html test2/version.html test3/version.jsp test4/version.html test5/version.jsp" # Cluster 2 CLUSTER2_SERVERS="srv01:7055 srv02:7056 srv03:7057 srv04:7058" CLUSTER2_APPLIS="test/version.html test2/version.html test3/version.jsp test4/version.html" # …

Member Avatar for Watael
0
228
Member Avatar for MadJako

Good Morning, I'm new to Powershell and i'm attempting to create a script which will copy a folder to a spesific directory on an FTP site. I did some Googling and all I seem to come up with are ways to copy the folder contents, but not the folder itself. …

0
123
Member Avatar for aditya369

I have been working with web traces and i need to change a particular format of the web trace to another. for example from cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 cs21 793468639 122791 173 icons-html/HomePageIcon.gif ALT=" 0 0.0 to cs21 …

Member Avatar for aditya369
0
353
Member Avatar for malluce

Hi, I'm trying to output the return result on terminal by using >; however, I realized that it will overwrite the previous results. I'm wondering if there's a way to append the result to the file instead of overwriting it. So far this is what I have: FILENAME=$1 while read …

Member Avatar for rch1231
0
145
Member Avatar for M4trixSh4d0w

I made a mini compiler to help compile C code easier on linux machines with bash #!/bin/bash function project_menu { header echo "Edit project: $1" dir echo "1) New file" echo "2) Edit file" echo "3) Compile file" echo "4) Run Project" echo "5) Compile & Run Project" echo "6) …

Member Avatar for DoRight
0
242
Member Avatar for malluce

I know the way to read line by line: FILENAME=$1 cat $1 | while read LINE do echo "$LINE" done but what if I have something like "Type \t Value" in each line that I need to separate them in LINE. An example will be something like Integer 2 String …

Member Avatar for malluce
0
159
Member Avatar for vikarna
Member Avatar for rubberman
0
95
Member Avatar for toldav

Hi, I'm trying to run my script but is not working for some reason the functions is not working at all. Anyone willing to help me to find out the error. Thank you. #!/bin/bash DATE=$(date +"%m_%d_%Y"); turn_off_services() { echo -e "\n## Remove unnecessary services" ## Turn off unnecessary services ## …

Member Avatar for toldav
0
137
Member Avatar for jo386

My code is rather basic so excuse my lack of shell scripting experience. I keep getting errors for line 3. I have tried changing "$1" to `echo $1` `cat $1` and even turning the whole line into a variable which i read in another forum and then calling that variable …

Member Avatar for jo386
0
1K
Member Avatar for mcogliandro

I have this script that I thougth only deleted stuff more than 90 days old but after I ran it, it deleted pretty much everything on my backup drive. Thankfuly I have another backup drive so I did not lose my backup but I need to fix this so it …

Member Avatar for rch1231
0
156
Member Avatar for Akusa

I have to write two scripts, one in bash and one in dos. My dos one works perfectly but I'm having trouble with my bash one. The assignment is to make a script that takes a command line argument (from a test script) and return the change. So if the …

Member Avatar for dfl1954
0
406
Member Avatar for replic

Hello everyone, i am fairly new to shell scripting so please bear with me. The following script is supposed to read words from a file and depending on the word print different things. However it always prints the default value. It also refuses to work completely if the first line …

Member Avatar for replic
0
333
Member Avatar for k2k

Today I have finally made up my mind to quit bat scripting and go for powershell... I need to do a quick script bascially trying to looping through a command output.. can anyone shed some light? i tried foreach ($col in 'app-command -argument') { echo $col } well, guess my …

0
172
Member Avatar for Leela2403

I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using %BASH% --login -i "/cygdrive/d/script.sh", where %BASH% is an environment variable in Windows set to C:\cygwin\bin\bash.exe. I have a created a Cygwin environment variable $EXE_PATH = /cygdrive/d/somepath/dir. Inside my script the line is …

0
171
Member Avatar for manujkathuria

Hi i am trying to send email using linux mail command, it does not show any error but its not delivering to the recipient, i am using redhat 5.8 and the command i used is echo "Hi" | mail -s 'Hi' username@gmail.com do i need to configure any redhat file …

Member Avatar for rch1231
0
97
Member Avatar for lewashby

In the following script I can't get the variable STARTPOINT to increment by 3 each time through the loop. I con't get it because the variable NUMBEROFGROUPS is incrementing by -1 each time and both increment lines look identical to me. #!/bin/bash set -x leading_zeros() { local NUM=${1} local NUMBEROFDIGITS=${2} …

Member Avatar for rch1231
0
146
Member Avatar for erezz

Hi, I have a log file contain 28 lines, 1-I need to grep the line with the size next to that i need to grep the name from the line Example: Size element 1. 906K ykms2 2. 1.2M ykps1 2-if one or more of the lines are missing I need …

Member Avatar for erezz
0
209
Member Avatar for manujkathuria

Hi, I would like to write a script to scp files from 1 server to other but the problem is if scp fails maybe because of server crash or somthing like that, i would like to start scp from the last file. i dont want to copy all the files …

Member Avatar for L7Sqr
0
113
Member Avatar for ms061210

Hi, I am creating a program that will validate if the user input date is correct. My problem is checking the month, 1. Is it possible to save the all the months in an array and then check the array if the user input is correct. 2. How can it …

Member Avatar for lewashby
0
204
Member Avatar for lewashby

The following line of code should result in GROUPS holding a number from 1 to probably 4 or 5. I need the next line to simply add 1 to whatever this lines results to. I've tried a lot of tings in bash but I can't make it happen. Any ideas? …

Member Avatar for L7Sqr
0
105

The End.