- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 23
- Posts with Upvotes
- 20
- Upvoting Members
- 15
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
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 … |
|
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 … |
|
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 |
|
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 - … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
the output of both is the same .. could anyone please explain the working dynamcis ? Thanks |
|
Hi I want to check wether user exist in server or not uisng shell script? can any one help me regarding this |
|
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 … |
|
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?? … |
|
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 … |
|
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 … |
|
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. … |
|
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 … |
|
|
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 … |
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? |
|
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? |
|
i got a string var=96.33% from 120 how do i get 96.33 from $var? |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
$ awk -F ":" 'NR!=1 {print $1}' test1.txt what does this mean?? especially ":"?? |
|
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" # … |
|
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 … |