10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to understand what the grep command in ubuntu is trying to do here.
The contents of my test file is given below
harsha@harsha-H67MA-USB3-B3:~/Documents$ cat data
abcd
efghi
jklmno
pqr
stuv
wxyz
When I grep for 3 dots (...) without the parenthesis as follows I would expect the... (4 Replies)
Discussion started by: sreeharshasn
4 Replies
2. Shell Programming and Scripting
Hello folks i have file which is below, i want to extract last column of file that contains dm-21 or dm-13 or dm-N
it show output like
I have tried but i got this (16 Replies)
Discussion started by: learnbash
16 Replies
3. UNIX Desktop Questions & Answers
hey , i m trying to figure out how to do the following :
i got a text file the looks like so:
1031
1031
1031
1031
1031
1031
1031
1031
16500
16500
16500
16500
1031
1031 (4 Replies)
Discussion started by: boaz733
4 Replies
4. Shell Programming and Scripting
Need Help For GREP
I have a file say g1.txt and content of file is below
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /t REG_DWORD /d 4 /f ,
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoClose /t REG_DWORD /d 1 /f ,... (4 Replies)
Discussion started by: jalpasoni
4 Replies
5. Shell Programming and Scripting
Hi,
Is there a command to print one character x amont of times?
I need for example 10 comma's (,,,,,,,,,,). Instead of creating a loop, I was wondering if there is a way to do this with sed or awk?
Thanks! (3 Replies)
Discussion started by: Subbeh
3 Replies
6. Shell Programming and Scripting
Hi all,
I'm trying to gather data directly following a keyword in a file but I have no guarantee where it will appear in said file so I can't use cut or anything else that assumes it will be located at a certain position. If anyone has any suggestions I'd be grateful. Here is an example of the... (7 Replies)
Discussion started by: Korn0474
7 Replies
7. UNIX for Dummies Questions & Answers
Hi folks
I am issuing the following command:
grep "" *
Looking for the characters \/:*?"<>|#+%& within all files in a directory, but the command fails being unhappy with pipe:
ksh: 0403-057 Syntax error: `|' is not expected.
How do I force the command to take the pipe | ? I guess... (2 Replies)
Discussion started by: daveaasmith
2 Replies
8. UNIX Desktop Questions & Answers
Hi there
I need to grep for a detail from a file. The pattern to search for involves escape sequences in it. This causes for the problem.
grep "P\_SOME\_STRING\_SEARCH" filename
Note, I have line like below in the file and expect it to grep.
select *
from my_system_param
... (3 Replies)
Discussion started by: guruparan18
3 Replies
9. Shell Programming and Scripting
I need to sort a file, the sort is not a alphabetical sort, it's based on a predefined order which is read from a file called fSortOrder.
The format of the fSortOrder file is :
STARTPATH"
....
....
The file that needs to be sorted is called tmpUnsorted and contains data in the format : ... (6 Replies)
Discussion started by: Vashj
6 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
I have lines like below in a file
A /u/ab/test1.dat
A/u/ab/test2.dat
A /u/bb/test3.dat
A/u/cc/test4.dat
I will need
/u/ab/test1.dat
/u/ab/test2.dat
/u/bb/test3.dat
/u/cc/test4.dat
Pls help
Thanks (6 Replies)
Discussion started by: thumsup9
6 Replies