9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do you write a script to ignore all lines except the --- dash lines and then remove --- dashes from the data in a text file?
Also how do you separate data in a text file with a tab (for example, column1 (software) and column2 (date) ) ?
Here is my scripts : I am getting errors in... (3 Replies)
Discussion started by: dellanicholson
3 Replies
2. UNIX for Dummies Questions & Answers
Hello...
Request for help and assistance...
I have a file.txt that contains multiple lines similar from below and I would like to extract to other file in a tab/space delimiter some certain values or field.
/dir1/File1.File2_File3/content/data/File4.File5.Service: <connection... (16 Replies)
Discussion started by: WPGPoseidon
16 Replies
3. Shell Programming and Scripting
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
Discussion started by: sushmab82
14 Replies
4. Shell Programming and Scripting
Is there a way to concatenate two strings, where the first string is "-n" and there is a space between the "-n" and the second string? Below are some examples of what I tried.
#!/bin/sh
var1=test
#working without dashes:
var2="n $var1"
echo $var2
var2=n" "$var1
echo $var2
var2="n... (5 Replies)
Discussion started by: wolfv
5 Replies
5. Shell Programming and Scripting
Input file is on Linux box and the input file has data in just one line with 1699741696 characters.
Sample Input:
<xxx><document coll="uspatfull" version="0"><CMSdoc>xxxantivirus</CMSdoc><tag1>1</tag1></document><document coll="uspatfull"... (5 Replies)
Discussion started by: gaya
5 Replies
6. UNIX for Dummies Questions & Answers
Hello
I have this string
XYZ-ABC
DFT-ERT
QWE-TYU
I want to get the part after the dash. how to do that?
thanks (2 Replies)
Discussion started by: melanie_pfefer
2 Replies
7. UNIX for Dummies Questions & Answers
so i have a simple file called -x and i need it renamed to x
now i dont understand why when using the most basic methods, only the code mv ./-x x changes the file name while using any other type of escape characters around the dash, such as single/double quotations or backslash, doesnt.
... (5 Replies)
Discussion started by: LumpSum
5 Replies
8. Shell Programming and Scripting
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
Discussion started by: mohancrr
1 Replies
9. Shell Programming and Scripting
Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Discussion started by: ropers
2 Replies