Search Results

Search: Posts Made By: cmdcmd
1,028
Posted By cmdcmd
How to find C programming functions using shell script?
I want to find c function definition with pattern with shell script by checking condition for each line:

data_type
functionname(param_list){
....
}

I knew cscope or ctag is usable for this...
1,515
Posted By cmdcmd
How to check string contain multiple tabs or spaces?
str contains tabs and multiple spaces
str="hello world. How are you?"

I want to check string start with hello world,
and my code is:

if [[ $str ==...
1,236
Posted By cmdcmd
Thank you all for good working solutions. That...
Thank you all for good working solutions. That what I want. Very appreciate your help.

cmdcmd :)
1,236
Posted By cmdcmd
How to remove /*...*/ ?
Sample code from apple's xnu code:

struct radix_node {
struct radix_mask *rn_mklist; /* list of masks contained in subtree */
struct radix_node *rn_parent; /* parent */
short rn_bit; /*...
2,618
Posted By cmdcmd
Sorry for my inconvenience post that make you not...
Sorry for my inconvenience post that make you not understanding. I will be careful to read the guideline before post a good quality question in the next posts.

However, I solved it.

The...
2,618
Posted By cmdcmd
I update my questions. Hope you understand what I...
I update my questions. Hope you understand what I want.
2,618
Posted By cmdcmd
Check string end with curly braces
[UPDATE]

file.txt

apple
apples{
applepicture
apple9
apple cake{
abple
apple_and_cake
appleapple
apple
apple(

and my script
while read line; do
if [[ "$line" == *{ ]]; then...
4,703
Posted By cmdcmd
Create new folder and text file the same time in one line
Is it possible to create new folder and write a new text file in the folder while the current position is outside the new folder? in one line

mkdir folder | echo "hello test"> folder/test.txt
...
3,962
Posted By cmdcmd
Thank you for reply
Thank you for reply
3,962
Posted By cmdcmd
Using grep to find C programming definition
Let's say I have a file written in C programming
...
int
function A (Param1, Param2)
{
....
}

How to grep this function?

I tried grep -ER '^functionA(.*)/n{' filename > result.txt
Not...
4,816
Posted By cmdcmd
Shell script to check line end not ending with comma
I have several line in a text file. for example
I like apple;
I like apple
I like orange;
Output: I like apple

I try to useif grep -q "!\;$"; then (Not work)
Please use CODE tags when...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 09:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy