Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
96% Quality Score
Upvotes Received
23
Posts with Upvotes
20
Upvoting Members
15
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
2 Endorsements
Ranked #620
Ranked #505
~24.9K People Reached
Favorite Forums
Favorite Tags
Member Avatar for nikita.

Hi, i want to delete a column from a file. the file is like : 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 1|2|3|4|5|6|7|8|9|0 if i want to remove any column the outout should be like ( suppose 4): 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 1|2|3|5|6|7|8|9|0 i have used swk command, but its not …

Member Avatar for Liam Huang
0
2K
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 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 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 changeworld4u

Hi Team, I have a file which contain following data like BKP0000032183140217000019 053IGZYEVSDOX .........field 2....... field3.....field4..... BKP0000032284140217000019CCTP1220 ............... BKP0000032384140217000019CA ..................... each line has 5 fields Now using shell script i am trying to extract field 4 based on condition that line start with BKP and contain code 84 and CA …

Member Avatar for changeworld4u
0
283
Member Avatar for lewashby

echo ${NUM:0:2} The above is just an example of the kind of code I'M using. I need a way to represent the end of the string. Is there a way to start from the right side of a line of text instead of the left? What I'M trying to do …

Member Avatar for cfajohnson
0
197
Member Avatar for santakdalai90

I am trying to search for a shell script if it is running and then assigning the count to a variable. Let the script be ScriptXYZ.sh. I wrote: proc_count=$(/bin/ps -ef | grep ScriptXYZ.sh | grep -v grep | wc -l) The problem that I am facing is that even when …

Member Avatar for santakdalai90
0
453
Member Avatar for chris.kelley.5015

Hello, I am trying to create a script that will compare one word at a time from one file to every word in a second file. I know how to design nested for loops to read the first entry in file1 and compare it to every entry in file2, so …

Member Avatar for Watael
0
263
Member Avatar for JukesK

i've just given a script to update and maintain by my manager, but its bash and i dont know that much about it.. i currently have a script that looks through .txt files for given serials that then reports to a php webpage. within this script we have around 20 …

Member Avatar for Watael
0
282
Member Avatar for krystosan

I am a pythoneer, guess List is called hash in shell script , I want to know how to do this for arg in "$@"; do echo `pwd`'/'$arg; done how do i pass the collected this list of items in $args to a different applications that takes these items as …

Member Avatar for L7Sqr
0
125
Member Avatar for chophouse

I'm not sure exactly which forum to ask this,so I'm starting here, I have a cron job I want to execute every 72 minutes. I've researched how to schedule the job for an interval of 60 min or less, but is there a way to specify a minutes interval when …

Member Avatar for Watael
0
567
Member Avatar for leghorn

the output of both is the same .. could anyone please explain the working dynamcis ? Thanks

Member Avatar for masijade
0
148
Member Avatar for arunkumarch

Hi I want to check wether user exist in server or not uisng shell script? can any one help me regarding this

Member Avatar for CrazyDieter
0
267
Member Avatar for duke.tim

How can an array be accessed from within another function? Here is an example of some code. editarray can not seem to access values of the array from outside of the writetofile function. Is there any way to change the scope of the array? #!/bin/sh writetofile() { templine=`cat /dev/stdin` export …

Member Avatar for Watael
0
244
Member Avatar for duke.tim

Why is it that no matter how long I put the sleep command or loop, cat is unable to read the file, even though the file already exsists? Is there any way of reliably waiting for the whois to finish, write to file and then read that the file exsists?? …

Member Avatar for duke.tim
0
239
Member Avatar for shamusk

I am new to the awk scripts. I am confused about the delimiter concept in the awk script. say delimiter is , or | or anything, then a new line is treated as a next line ? like e.g. 00|01|05|05|03|13|12|04|06|80| 03|01|01|00|52|10|12|11|05|12| So there are 10 fields in each row, and …

Member Avatar for Watael
0
157
Member Avatar for leghorn

hi all only the weirdest thing happened with me just now. I was debugging a shell script and I found that a step that was supposed to execute later ws getting executed prior to another step for no reason. You know any ? i mean have a look at the …

Member Avatar for Watael
0
115
Member Avatar for chriswelborn

I'm no pro when it comes to BASH, but I have been known to shell-script my way out of a problem here and there. One of the useful things you can do is a for-loop, whether it be used on file names, script arguments, or just a string of words. …

Member Avatar for chriswelborn
0
377
Member Avatar for leghorn

hi,a question .. why does my script work as sh script.sh and not as ./script.sh ?? also,i was trying to write a script that would filter out a pattern in a .txt file and display the count of the same. Say my pattern is king, and there are 4 "king"s …

Member Avatar for chriswelborn
0
145
Member Avatar for Rahul47

vi is basically used independently .....but what if vi commands are used in shell script ? I am trying to accomplish functionality of mv command using a shell script. what I want is to yank whole text of one file1 and paste it in file2. this all should happen in …

Member Avatar for Watael
0
254
Member Avatar for lewashby

I'M wanting to write my own command/script for compiling my c++ files. I use g++ -g -Wall filename.cpp -o filename I'M trying to figure out how I can trip of the last four characters (.cpp) from a string. Any ideas?

Member Avatar for rojomoke
0
245
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 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
147
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
236
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
178
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
Re: awk

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

Member Avatar for Watael
0
106
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
227
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
350